Error: Notice: Undefined index: und in mymodule_handler_product_link->render() (line 16 of /sites/all/modules/custom/mymodule/mymodule_handler_product_link.inc)

Date: 
Saturday, November 17, 2018 - 23:30

Code: $product_url = $entity->field_item_url[LANGUAGE_NONE][0]['value'];

Error: Notice: Undefined index: und in mymodule_handler_product_link->render() (line 16 of /custom/mymodule/mymodule_handler_product_link.inc)

Project: 
Status: 
completed
Priority: 
normal

Comments

Posted by developer7 on 11/17/2018 - 23:38

if(!empty($entity->field_seller)){
$seller = $entity->field_seller[LANGUAGE_NONE][0]['tid'];
}
if(!empty($entity->field_item_url)){
$product_url = $entity->field_item_url[LANGUAGE_NONE][0]['value'];
}

by Shikha https://www.upwork.com/fl/shikharani

Project Management