In theme.inc, l. 380 we have:

    // Merge the newly created theme hooks into the existing cache.
    $cache = array_merge($cache, $result);

From PHP doc:
"
Warning

The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array .
"

So let's say you are adding a theme and create a mistaken hook. When parsing it, the cache is emptied and you may have in front of you a blank page (for instance) making it difficult to force a clear cache when you have fixed your error.

I think it would cost nothing to replace it with something like that:

if (is_array($result)) $cache = array_merge($cache, $result);

(or may be: $cache = array_merge($cache, (array)$result);)

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.