Closed (fixed)
Project:
Views Custom Field
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2009 at 16:57 UTC
Updated:
28 Mar 2009 at 23:20 UTC
I get this warning... Though it is working...
* warning: Invalid argument supplied for foreach() in E:\Wamp\www\mysite\sites\all\modules\views_customfield\includes\views_customfield_handler_field_phpcode.inc on line 59.
* warning: Invalid argument supplied for foreach() in E:\Wamp\www\mysite\sites\all\modules\views_customfield\includes\views_customfield_handler_field_phpcode.inc on line 59.
What can cause this? How can I solve?
Comments
Comment #1
blockedmind commentedthis is kinda urgent. no ideas?
Comment #2
blockedmind commentedi get myself a temp solution you should consider. it does not correct the code but avoids error.
before the error line contains foreach i check whether the array is empty of not... which goes as:
if(empty($h->field_values[$values->{$h->field_alias}])==false) {
foreach ($h->field_values[$values->{$h->field_alias}] as $k => $v) {
$tmp[$k] = $v;
// clean up a bit
unset($tmp[$k]['#delta']);
unset($tmp[$k]['_nid']);
}
}
the first and last lines are added by me.
Comment #3
nk_ commentedSame error here but seems like blockedmind patch is working.
I think this issue should be considered at least.
Comment #4
casey commentedcommitted