diff options
author | Jannik Schönartz | 2017-03-09 12:09:34 +0100 |
---|---|---|
committer | Jannik Schönartz | 2017-03-09 12:09:34 +0100 |
commit | 86aa9c8d37de29bc4a46881fb70b72619c3cc390 (patch) | |
tree | 848b58d9cee3bab2e11f38712ca3c3d5207c866b /modules-available/locationinfo/api.inc.php | |
parent | API: Reworked getRoomInfo with isset and added overlay if coords = true (diff) | |
download | slx-admin-86aa9c8d37de29bc4a46881fb70b72619c3cc390.tar.gz slx-admin-86aa9c8d37de29bc4a46881fb70b72619c3cc390.tar.xz slx-admin-86aa9c8d37de29bc4a46881fb70b72619c3cc390.zip |
API: Send an empty array if the overlay is null
Diffstat (limited to 'modules-available/locationinfo/api.inc.php')
-rw-r--r-- | modules-available/locationinfo/api.inc.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php index 575b04f4..3a6618d8 100644 --- a/modules-available/locationinfo/api.inc.php +++ b/modules-available/locationinfo/api.inc.php @@ -327,6 +327,9 @@ function getRoomInfo($idList, $coords) { $pc['x'] = $position['gridCol']; $pc['y'] = $position['gridRow']; $pc['overlay'] = $position['overlays']; + if ($pc['overlay'] == null) { + $pc['overlay'] = array(); + } } $pc['pcState'] = LocationInfo::getPcState($dbdata); |