Download & Extend

uninitialized value in _registry_check_code

Project:Drupal core
Version:7.x-dev
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

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.

Comments

#2

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
345351_add_empty.patch680 bytesIdlePassed: 11226 passes, 0 fails, 0 exceptionsView details | Re-test

#3

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))?

#4

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.