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.
When an anonymous user views content I get the following error. I think this may be related to a custom module, but disabling still produces the error.
Error does not show for authenticated user. Any help is greatly appreciated.
•Notice: Undefined index: und in eval() (line 4 of /home/my4hbook/public_html/demo/sites/all/modules/cck/cck.module(304) : eval()'d code).
•Warning: Invalid argument supplied for foreach() in eval() (line 4 of /home/my4hbook/public_html/demo/sites/all/modules/cck/cck.module(304) : eval()'d code).
Comments
Comment #1
Pun-1 CreditAttribution: Pun-1 commentedUpdate - I've tracked it down to this code for a field - which should return a list of users "projects" from their account....
global $user;
$user_data = user_load($user->uid);
$values = array();
foreach($user_data->field_user_projects['und'] as $option){
$values[$option['value']] = $option['value'];