Patch says all.

I saw this while debugging through page_manager_get_page_cache. Checked other calls to drupal_static() which were missing a & and changed only those which actually assign a value to the return variable.

In case you want to know, here's the commits that led to the code which this patch is changing:
#2155825: Add UUID generation functionality to CTools
http://cgit.drupalcode.org/ctools/diff/?id=a40482acb67cf99a66e22128a96e4...
#1275886: Error - Notice: Trying to get property of non-object in menu_block_view_alter()

Comments

maximpodorov’s picture

There are 6 drupal_static() calls without '&' in ctools.

maximpodorov’s picture

StatusFileSize
new1.67 KB

I re-rolled the patch.
Other drupal_static() calls without ampersand are acceptable since the code doesn't modify the returning value. So the current patch is correct in this sense.

chris matthews’s picture

The 3 year old patch in #2 to ctools.module; page_manager.module and block.inc applied cleanly to the latest ctools 7.x-1.x-dev and if still applicable needs to be reviewed.

Checking patch ctools.module...
Hunk #1 succeeded at 476 (offset 85 lines).
Checking patch page_manager/page_manager.module...
Checking patch plugins/content_types/block/block.inc...
Hunk #1 succeeded at 352 (offset -62 lines).
Applied patch ctools.module cleanly.
Applied patch page_manager/page_manager.module cleanly.
Applied patch plugins/content_types/block/block.inc cleanly.
Jorrit’s picture

Status: Needs review » Reviewed & tested by the community

Works fine, thanks.

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for spotting these and brining it up. I've committed this to the latest dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

chris matthews’s picture