Following PHP notice with Metatag 7.x-.125 occurred on my site:
Notice: Undefined index: value in DrupalTextMetaTag->getValue() (line 486 of metatag/metatag.inc)
Notice: Undefined index: value in metatag_panels_ctools_render_alter() (line 215 of metatag/metatag_panels/metatag_panels.module)
Is there anyone know how to fix this?
Thanks,
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | metatag-n2982252-7.interdiff.txt | 1.37 KB | damienmckenna |
| #7 | metatag-n2982252-7.patch | 1.66 KB | damienmckenna |
| #2 | metatag-2982252-2.patch | 1.23 KB | Snehal Brahmbhatt |
Comments
Comment #2
Snehal Brahmbhatt commented@Mingsong, Please review my patch may this works for you.
Comment #3
damienmckennaDo you have any idea what meta tag was causing the problem?
Comment #4
mingsong#2 works to me.
Thanks Snehal
Comment #5
mingsongComment #6
damienmckennaPlease don't mark an issue "fixed" if there's a bug report and someone provides a patch. Thanks for mentioning that the patch fixes the bug, that's good to know. I'd love to work out what meta tag is causing the problem, or failing that, a comparison with the other parts of the module suite to see if they might be affected by the same problem.
Comment #7
damienmckennaThe code in getValue() would result in notices if $this->data['value'] didn't exist because then for the rest of the function $value doesn't exist. I think it'd be better to do it this way. Also, there was another case of it doing is_string() without also checking that the variable existed.
Comment #8
damienmckennaComment #10
damienmckennaCommitted. Thanks.