Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Following code is located in the block_page_build function.
$item = menu_get_item();
if ($item['path'] != 'admin/structure/block/demo/' . $theme) {
...
else {
// Append region description if we are rendering the regions demo page.
$item = menu_get_item();
if ($item['path'] == 'admin/structure/block/demo/' . $theme) {
The second item and if request can be removed.
Comment | File | Size | Author |
---|---|---|---|
#2 | remove-unnecessary-if-statement-1886390-2.patch | 2.19 KB | benjy |
#1 | 1886390-1-unnecessary_if.patch | 2.19 KB | nils.destoop |
Comments
Comment #1
nils.destoop CreditAttribution: nils.destoop commentedAnd a patch
Comment #2
benjy CreditAttribution: benjy commentedRe-rolled.
Comment #3
tim.plunkettNice find!
Comment #4
webchickGreat find!
Committed and pushed to 8.x. Thanks!