Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-01-29 10:00:44 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-01-29 10:00:44 +0300
commitc63204bfedeb4a52b426c94203f121bd11ebe512 (patch)
tree9ccef4069c2cfc74bd4e5ac12086fc2b0df0348d /plugins/Dashboard
parent9dbd4894c2b585cda89d75f3cc0cb0c58b56b074 (diff)
fixes #1100 - handle malformed dashboard layout
Diffstat (limited to 'plugins/Dashboard')
-rw-r--r--plugins/Dashboard/Controller.php18
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]);
+ }
}
}
}