From 72acac8b575f3a47a57c011ffe80366b75edb11e Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 15 Nov 2017 12:19:41 +0100 Subject: [PATCH] Fixed null values in js --- .../agentes/pandora_networkmap.view.php | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 24a421124c..2b2b1f0750 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -699,9 +699,24 @@ if (enterprise_installed()) { } else { $networkmap_filter = json_decode($networkmap['filter'], true); - $map_dash_details['x_offs'] = $networkmap_filter['x_offs']; - $map_dash_details['y_offs'] = $networkmap_filter['y_offs']; - $map_dash_details['z_dash'] = $networkmap_filter['z_dash']; + if ($networkmap_filter['x_offs'] != null) { + $map_dash_details['x_offs'] = $networkmap_filter['x_offs']; + } + else { + $map_dash_details['x_offs'] = 0; + } + if ($networkmap_filter['y_offs'] != null) { + $map_dash_details['y_offs'] = $networkmap_filter['y_offs']; + } + else { + $map_dash_details['y_offs'] = 0; + } + if ($networkmap_filter['z_dash'] != null) { + $map_dash_details['z_dash'] = $networkmap_filter['z_dash']; + } + else { + $map_dash_details['z_dash'] = 0; + } } }