This is a cosmetic change in followup of #1338282: Fix php notice in menu_link_save().
Current code
if (!$existing_item || (array_intersect_key($item, $existing_item)) != $existing_item)
has meaningless parenthesis around array_intersect_key().
This should be changed to
if (!$existing_item || (array_intersect_key($item, $existing_item) != $existing_item))
(suggested patch) or
if (!$existing_item || array_intersect_key($item, $existing_item) != $existing_item)
All three variants are syntactically equivalent, yet the second one suggests self-explaining order of operations
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal7.1516030-menu_link_save-cosmetic.5.patch | 741 bytes | rdickert |
#1 | 1516030-menu_link_save-cosmetic.patch | 761 bytes | valthebald |
Comments
Comment #1
valthebaldComment #2
xjmThanks!
Comment #3
Dries CreditAttribution: Dries commentedCommitted to 8.x. Moving to 7.x.
Comment #4
rdickert CreditAttribution: rdickert commentedTaking this issue for backport.
Comment #5
rdickert CreditAttribution: rdickert commentedBackported to D7.
Comment #6
valthebaldComment #7
webchickCommitted and pushed to 7.x. Thanks!
Comment #9
cweagansUpdating tags per http://drupal.org/node/1517250