Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
block.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Aug 2013 at 17:22 UTC
Updated:
29 Jul 2014 at 22:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
legolasboI've located all four of these variables and have come to the following conclusion.
$block_counter is used as part of the drupal cache process if i've understood the meaning of &drupal_static(__FUNCTION__, array()); correctly.
All instances of $block_id are actually unused, but are (the key) part of a foreach loop. I think removing these won't do the performance of their functions any good, but will reduce code understandability.
In my opinion we should leave these variables untouched.
Comment #2
legolasboComment #3
legolasboBecause of a discussion in #2057157: Remove Unused local variable $plugin from /core/modules/views/views.module the unused foreach key variables will be removed. I'll supply a patch soon.
Comment #4
legolasboAttached patch removes the unused foreach key variables.
Comment #5
benjy commentedAll good.
Comment #6
webchickCommitted and pushed to 8.x. Thanks!