On my site i got an error in this line:
foreach($items as $key=>$item)
since one can't be sure, that $items is an array.
I made a workaround like this (not nice code - it's a quickfix):
if(is_array($items))
{
foreach($items as $key=>$item)
for($i=0, $count=count($attributes); $i<$count; $i++)
if($item->$attributes[$i] != $values[$i])
{
unset($items[$key]);
break;
}
}
else
{
for($i=0, $count=count($attributes); $i<$count; $i++)
if($item->$attributes[$i] != $values[$i])
{
unset($items[$key]);
break;
}
}