Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
HI
Im getting the
error Undefined index: und in __lambda_func() (line 3 /sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
line 3 is /** so not sure what the cause is.
any help would be appreciated
Comments
Comment #1
bavramor CreditAttribution: bavramor commentedI got the same issue with this code:
Error notice:
tested with :
7.x-1.0-alpha1
7.x-1.x-dev
any help would be appreciated
Comment #2
johnvThis is an error in your own code.
1. You can inspect the available data with devel module enabled:
dpm($node);
2. Perhaps the field has no value yet, so do a
$var1 = isset($node->body['und'][0]['value']) ? $node->body['und'][0]['value'] : '';
.3. go the fancy way with Entity Metadata Wrappers (I think you must enable the Entity module first):
Comment #3
Liam Morland