Skip to content

Issue #3265888: Drupal crashes after clearing caches and after enabling new module

Pavel Serzhanin requested to merge issue/drupal-3265888:7.x into 7.x

Hi there!

As the drupal_get_schema() function (see bootstrap.inc) can returns FALSE I propose to add additional checks to prevent FATAL errors on PHP8.1

for drupal_schema_field_types(): $table_schema_fields = (!empty($table_schema['fields']) && is_array($table_schema['fields'])) ? $table_schema['fields'] : array();

for drupal_schema_fields_sql(): $schema_fields = (!empty($schema['fields']) && is_array($schema['fields'])) ? $schema['fields'] : array();

All changes see in proposed merge request.

Best Regards, Pavel

Merge request reports