diff options
author | Simon Rettberg | 2018-11-21 15:04:51 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-11-21 15:04:51 +0100 |
commit | 5eaab871e37bfedc1ad6532829031dcfa93c3d09 (patch) | |
tree | a9239201d5e06cc7b9c8000c760124bb043148ae /modules-available/locationinfo/inc | |
parent | [baseconfig_bwlp] Add SLX_PREFERRED_SOUND_OUTPUT (diff) | |
download | slx-admin-5eaab871e37bfedc1ad6532829031dcfa93c3d09.tar.gz slx-admin-5eaab871e37bfedc1ad6532829031dcfa93c3d09.tar.xz slx-admin-5eaab871e37bfedc1ad6532829031dcfa93c3d09.zip |
[locationinfo] Fix infinite loop with malformed backend data
Diffstat (limited to 'modules-available/locationinfo/inc')
-rw-r--r-- | modules-available/locationinfo/inc/infopanel.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/locationinfo/inc/infopanel.inc.php b/modules-available/locationinfo/inc/infopanel.inc.php index edeb9ccf..918030f0 100644 --- a/modules-available/locationinfo/inc/infopanel.inc.php +++ b/modules-available/locationinfo/inc/infopanel.inc.php @@ -75,6 +75,8 @@ class InfoPanel } /** + * {"language":"de","mode":1,"vertical":true,"eco":false,"scaledaysauto":true,"daystoshow":7,"rotation":0,"scale":56,"switchtime":10,"calupdate":120,"roomupdate":20, + * "overrides": { "12" : { "mode":4} } * Gets the location info of the given locations. * Append to passed array which is expected to * map location ids to properties of that location. @@ -157,6 +159,8 @@ class InfoPanel // Iterate over the locations we're actually interested in $locations = Location::getLocationsAssoc(); foreach ($idList as $locationId) { + if (empty($locationId)) + continue; // Start checking at actual location... $currentId = $locationId; while ($currentId !== 0) { @@ -175,6 +179,8 @@ class InfoPanel } } // Keep trying with parent + if (!isset($locations[$currentId])) + break; $currentId = $locations[$currentId]['parentlocationid']; } } |