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.
The DrupalTextMetaTag::getValue() method accepts a blank array as a default argument but then immediately expects the 'instance' array element to exist. Obviously some error checking is needed.
This was originally mentioned in #1970064: Page metatag set with context generate a notice.
Comment | File | Size | Author |
---|---|---|---|
#12 | metatag-n1994634-12.patch | 701 bytes | Ronino |
#11 | metatag-n1994634-11.patch | 701 bytes | Ronino |
#8 | metatag-n1994634-8.patch | 815 bytes | DamienMcKenna |
#7 | metatag-n1994634-7.patch | 374 bytes | DamienMcKenna |
#4 | metatag-n1994634-4.patch | 441 bytes | EdgarPE |
Comments
Comment #1
DamienMcKennaThis just adds an empty value if the element doesn't exist.
Comment #2
DamienMcKennaCommitted.
Comment #4
EdgarPE CreditAttribution: EdgarPE commentedPatch in #1 does not fix every error, sometimes it pops up. Heres a better, hopefully full fix.
Comment #5
Countzero CreditAttribution: Countzero commentedPatch in #4 (which doesn't apply on latest dev BTW) works OK, while latest dev doesn't. Thanks.
Comment #6
DamienMcKenna#4: metatag-n1994634-4.patch queued for re-testing.
Comment #7
DamienMcKennaThis should work.
Comment #8
DamienMcKennaI think this will be a better approach.
Comment #9
DamienMcKennaCommitted, thanks.
Comment #11
Ronino CreditAttribution: Ronino commentedHere's a patch for those running 7.x-1.0-beta7.
Comment #12
Ronino CreditAttribution: Ronino commentedIgnore this, drupal.org seems to have a hard time and so I thought the first submit didn't work ;-).