While reading
http://api.drupal.org/api/function/_registry_check_code/7
There's a potential of $cache_update_needed bein uninitialized when ($type == REGISTRY_WRITE_LOOKUP_CACHE)

This is only called in includes/common.inc in drupal_page_footer and $cache_update_needed makes sense only on that location if it was initially set to FALSE.

CommentFileSizeAuthor
#2 345351_add_empty.patch680 bytesdeekayen

Comments

deekayen’s picture

Status: Active » Needs review
StatusFileSize
new680 bytes

...or maybe wrap it in empty()?

damien tournoud’s picture

Status: Needs review » Needs work

We haven't seen any warnings... does that mean that this optimisation is broken (ie. would $cache_update_needed always be true when entering _registry_check_code(REGISTRY_WRITE_LOOKUP_CACHE))?

marcingy’s picture

Status: Needs work » Closed (works as designed)

I believe the report above is incorrect the value in question is a static and hence initialised to NULL. NULL can be testing in an if happily.