diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-01-29 10:00:44 +0300 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-01-29 10:00:44 +0300 |
commit | c63204bfedeb4a52b426c94203f121bd11ebe512 (patch) | |
tree | 9ccef4069c2cfc74bd4e5ac12086fc2b0df0348d /plugins/Dashboard | |
parent | 9dbd4894c2b585cda89d75f3cc0cb0c58b56b074 (diff) |
fixes #1100 - handle malformed dashboard layout
Diffstat (limited to 'plugins/Dashboard')
-rw-r--r-- | plugins/Dashboard/Controller.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php index 11515574a3..6b79a431d3 100644 --- a/plugins/Dashboard/Controller.php +++ b/plugins/Dashboard/Controller.php @@ -148,15 +148,21 @@ class Piwik_Dashboard_Controller extends Piwik_Controller { foreach($layoutObject as &$row) { + if(!is_array($row)) + { + $row = array(); + continue; + } + foreach($row as $widgetId => $widget) { if(isset($widget->parameters->module)) { - $controllerName = $widget->parameters->module; - $controllerAction = $widget->parameters->action; - if(!Piwik_IsWidgetDefined($controllerName, $controllerAction)) - { - unset($row[$widgetId]); - } + $controllerName = $widget->parameters->module; + $controllerAction = $widget->parameters->action; + if(!Piwik_IsWidgetDefined($controllerName, $controllerAction)) + { + unset($row[$widgetId]); + } } } } |