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.

Files: 
CommentFileSizeAuthor
#12 metatag-n1994634-12.patch701 bytesRonino
#11 metatag-n1994634-11.patch701 bytesRonino
#8 metatag-n1994634-8.patch815 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]
#7 metatag-n1994634-7.patch374 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]
#4 metatag-n1994634-4.patch441 bytesEdgarPE
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]
#1 metatag-n1994634-1.patch417 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new417 bytes
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

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

Status:Needs review» Fixed

Committed.

Status:Fixed» Closed (fixed)

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

Status:Closed (fixed)» Needs review
StatusFileSize
new441 bytes
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

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

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

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

StatusFileSize
new374 bytes
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

This should work.

StatusFileSize
new815 bytes
PASSED: [[SimpleTest]]: [MySQL] 73 pass(es).
[ View ]

I think this will be a better approach.

Status:Needs review» Fixed

Committed, thanks.

Status:Fixed» Closed (fixed)

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

StatusFileSize
new701 bytes

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

StatusFileSize
new701 bytes

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