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.
Features tries to access a non-existent array key, causing a notice:
WD php: Notice: Undefined index: widget_active in content_features_rebuild() (line 161 of /sites/all/modules/features/includes/features.content.inc).
Comment | File | Size | Author |
---|---|---|---|
#4 | features-n985520-4.patch | 1.52 KB | DamienMcKenna |
#2 | actions-985814-d6.patch | 658 bytes | joshuajabbour |
#1 | features-985520.patch | 802 bytes | joshuajabbour |
Comments
Comment #1
joshuajabbour CreditAttribution: joshuajabbour commentedComment #2
joshuajabbour CreditAttribution: joshuajabbour commentedwrong issue, ignore this patch...
Comment #3
beeradb CreditAttribution: beeradb commentedThis fixes the notices for me, is dead simple, and is best practice anyway. RTBC on #1.
Comment #4
DamienMcKennaHere's another quick patch that fixes the same logic error in other places.
Comment #5
mikeryanLooks good, and eliminates tons of unnecessary notices when running simpletests for me.
Comment #6
wojtha CreditAttribution: wojtha commentedsubscribing
Comment #7
ryan_courtnage CreditAttribution: ryan_courtnage commentedPatch in #4 is good.
Comment #8
bleen CreditAttribution: bleen commentedbump / sub
Comment #9
tim.plunketthttp://drupalcode.org/project/features.git/commit/80db53f
Comment #11
Sknight17 CreditAttribution: Sknight17 commentedI'm noticing the patch in #4 hides the 'state' when using drush in the command line. The state will still show up in the UI. However, this patch makes it impossible for those that use 'drush fl' as apart of their workflow. Is anyone else experiencing the same issue?
Comment #12
bcmiller0 CreditAttribution: bcmiller0 commentedwe are hitting this case, but the actual data on hitting it shows $existing_instance[0]['widget_active']. Which seems like the patch avoids it but does a query update when it doesn't need to. as the widget_active is already set "1" but the existing_instance variable is an array when maybe shoudn't be.