When a user clicks on any user profile other than there own this error comes up...
warning: Invalid argument supplied for foreach() in /home2/antiaddi/public_html/drupal/modules/user/user.module on line 1507.
When a user clicks on any user profile other than there own this error comes up...
warning: Invalid argument supplied for foreach() in /home2/antiaddi/public_html/drupal/modules/user/user.module on line 1507.
Comments
Comment #1
rednikon commentedAlso, the website is http://antiaddicts.com
Comment #2
tille commented..same Problem with me - although it first worked so fine - now I get this same error..:|
greetz, t..
Comment #3
nrambeck commentedI just upgraded from 4.7.x to 5.1.7 and am getting the same error on line 1527 in user.module. Here is the code for reference:
It seems the $items variable is not recognized as an array, so if I force the variable as an array like below, the error goes away.
But I think the ultimate solution is to look at the profile module where the array is being generated. This is from the profile_view_profile() function in the profile module:
I've tried rewriting this code several ways to reform the array, but nothing seems to fix the problem. My fix in the user module doesn't address the source of the problem, so if anyone else can see the real issue please speak up.
For further reference in my scenario this is a sample array generated by the profile_view_profile() function:
Comment #4
dave reidDo you maybe have a contrib module that is improperly implementing hook_user('view')?
Comment #5
dpearcefl commentedConsidering the lack of activity on this issue and that Drupal v5 is no longer supported by for fixes or patches, I am going to close this ticket.