By mikegirard on
Hi -
I use this line to access the taxonomy_term associated with a content field called field_neighborhood.
$field_neighborhood = $node->field_neighborhood['und'][0]['taxonomy_term'];
On the home page where the teasers render, I get this error:
Notice: Undefined property: stdClass::$field_neighborhood in mytheme_preprocess_node() and a series of errors related to the property being undefined, even though the code executes properly as if the property exists and produces the desired result.
Anyone know what's causing this and what I can do to fix it?
Thanks.
Comments
Had to use isset
I 'fixed' this by wrapping issets around every use of a property where this error was being triggered. Since the properties are available, I don't think this should be necessary.
I am assuming this is a bug in core unless otherwise informed.