From 8a8dd33e0d1371e2d327fbe45dfd023248ea3078 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Wed, 11 Oct 2017 21:54:51 +0300 Subject: [PATCH] Prerelease 11.10.2017 fix bug on empty device table --- Sccp_manager.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 9be3c10..4040b91 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -783,10 +783,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { break; case "getPhoneGrid": $result = $this->get_db_SccpTableData('SccpDevice'); + $staus = $this->sccp_get_active_devise(); if (empty($result)) { $result = array(); } else { - $staus = $this->sccp_get_active_devise(); +// $staus = $this->sccp_get_active_devise(); foreach ($result as &$dev_id) { $id_name = $dev_id['name']; if (!empty($staus[$id_name])) { @@ -801,6 +802,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $dev_id['address'] = '- -'; } } + } + if (!empty($staus)) { // Array ( [name] => SEP0004F2EDCBFD [mac] => SEP0004F2EDCBFD [type] => 7937 [button] => line,7818,default ) foreach ($staus as $dev_ids) { $id_name = $dev_ids['name'];