I defined several fields within the profile in certain categories. Some of those are forced - some not. If a category of fields keeps empty, i get the error:
warning: Invalid argument supplied for foreach() in *********/httpdocs/modules/user/user.module on line 655.
I fixed this with: if($items) {}
if($items)
{
foreach ($items as $item) {
if (isset($item['title'])) {
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'</dt>';
}
$output .= '<dd class="'. $item['class'] .'">'. $item['value'] .'</dd>';
}
}
$output .= '</dl>';
regards
Christian
Comments
Comment #1
macm commentedThanks, works fine! please fix to next drupal release.
Comment #2
Crell commentedPlease don't mark something closed unless it already has been fixed. Also, please don't assign it to yourself unless you're volunteering to fix it. Thank you for volunteering. When can we expect a patch? :-)
Comment #3
green monkey commentedD5.1
similar error warning: Invalid argument supplied for foreach() in /home/mysite.com/modules/user/user.module on line 1506.
when clicking on user in the "Submitted by" node link
Comment #4
dpearcefl commentedConsidering the age of this issue with no comments and that Drupal 5 is no longer supported, I'm closing this ticket.