Merge pull request #1528 from moteus/no_menu_warning

Fix. warning about using NULL as first argument in `foreach`.
This commit is contained in:
FusionPBX 2016-03-30 08:46:46 -06:00
commit 7228cf2c62
1 changed files with 2 additions and 1 deletions

View File

@ -390,7 +390,7 @@
$db = $this->db;
//database ojbect does not exist return immediately
if (!$db) { return; }
if (!$db) { return Array(); }
//if there are no groups then set the public group
if (!isset($_SESSION['groups'])) {
@ -435,6 +435,7 @@
//save the menu into an array
$x = 0;
$a = Array();
foreach($result as $row) {
//add the row to the array
$a[$x] = $row;