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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
417 bytes

This just adds an empty value if the element doesn't exist.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

EdgarPE’s picture

Status: Closed (fixed) » Needs review
FileSize
441 bytes

Patch in #1 does not fix every error, sometimes it pops up. Heres a better, hopefully full fix.

Countzero’s picture

Patch in #4 (which doesn't apply on latest dev BTW) works OK, while latest dev doesn't. Thanks.

DamienMcKenna’s picture

#4: metatag-n1994634-4.patch queued for re-testing.

DamienMcKenna’s picture

FileSize
374 bytes

This should work.

DamienMcKenna’s picture

FileSize
815 bytes

I think this will be a better approach.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Ronino’s picture

FileSize
701 bytes

Here's a patch for those running 7.x-1.0-beta7.

Ronino’s picture

FileSize
701 bytes

Ignore this, drupal.org seems to have a hard time and so I thought the first submit didn't work ;-).