Closed (fixed)
Project:
ProfilePlus
Version:
5.x-1.2
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2010 at 03:04 UTC
Updated:
1 Sep 2010 at 19:10 UTC
Error I got:
Invalid argument supplied for foreach() in /xxx/sites/all/modules/profileplus/profileplus.module on line 136.
I added "an if clauses" before foreach loop to check if $profile_fields is an array. If it is not, I continue
$entry = array();
if(!is_array($profile_fields)){
continue;
}
foreach($profile_fields as $category => $fields) {
foreach($fields as $field) {
$entry[] = $field['value'];
}
$view = implode(' | ', $entry);
}
I haven't dig further for the exact cause. I guess some user profile is not loaded as an array.
Comments
Comment #1
james marks commentedFixed in release of 5.x-1.3
James