Jello, First time poster.
I need some help fixing this problem, my coding experience in PHP is limited so go easy on me.
I am getting this error: Warning: Invalid argument supplied for foreach() … on line 334
Here is the code the error is on line 6 below … foreach ($ids as $id)
[php]function getWidgets($position = null) {
if (empty($this->widgets)) {
foreach (wp_get_sidebars_widgets() as $pos => $ids) {
$this->widgets[$pos] = array();
foreach ($ids as $id) <----- this is the line
{
$this->widgets[$pos][$id] = $this->getWidget($id);
}
}
}
if (!is_null($position)) {
return isset($this->widgets[$position]) ? $this->widgets[$position] : array();
}
return $this->widgets;
}[/php]
Any help would be greatly appreciated. And I will dole out the Karma.