A module developer leaving hook_schema() without any return value (hence returning FALSE) will break calling code in the way that _drupal_initialize_schema() reacts to the situation. For example:

function hook_schema() {
}

The snippet above placed into a module's .install file would result in _drupal_initialize_schema() returning FALSE for that module's schema.

It is typical for a developer to leave stubs lying around while dealing with other parts of module implementation. For _drupal_initialize_schema() to NOT initialize an empty schema (passed in as FALSE) to be an array() breaks its contract.

Don't you dare 'by design' this one. ;)

Comments

triclops’s picture

+1

sammys’s picture

Status: Active » Needs review

Bumping status...

pancho’s picture

Title: _drupal_initialize_schema() breaks when an empty hook_schema() exists » empty hook_schema() breaks _drupal_initialize_schema()
Version: 6.0-beta4 » 6.x-dev

+1: Yeah, this looks useful.

chx’s picture

Status: Needs review » Closed (won't fix)

Drupal does not babysit broken code to avoid bloat.