fix: Select the correct dashboard when there are no defaults. (#6339)

This commit is contained in:
Tony Murray
2017-04-04 11:55:18 -05:00
committed by Neil Lathwood
parent 1bbbaff58b
commit dd91484716

View File

@@ -33,7 +33,7 @@ list($user_dashboards, $shared_dashboards) = array_reduce($dashboards, function
// if the default dashboard doesn't exist, set it to the global default or to 0
if (!isset($dashboards[$default_dash])) {
$global_default = (int)$config['webui']['default_dashboard_id'];
$default_dash = isset($dashboards[$global_default]) ? $dashboards[$global_default] : 0;
$default_dash = isset($dashboards[$global_default]) ? $global_default : 0;
}
// if there are no possible dashboards, add one