mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-27 02:35:43 +00:00
The goal is to increase confidence in fusionpbx, one step is to run by default with error_reporting (E_ALL ^ E_NOTICE);
So, please find in this set numerous small changes which eliminate numerous php warning messages. Also, a small bug fix in an sql statistics routine, naming a count(*) field as count, so displaying correct detail. If any of the proposed changes are omitted, the relevant page will experience php warnings. There are no doubt fusionpbx pages I've yet to visit that still generate warnings, this set is nearly certainly not comprehensive.
This commit is contained in:
@@ -203,7 +203,7 @@ if (!class_exists('menu')) {
|
||||
//if there are no groups listed in v_menu_item_groups under menu_item_uuid then add the default groups
|
||||
foreach($apps as $app) {
|
||||
foreach ($app['menu'] as $sub_row) {
|
||||
foreach ($sub_row['groups'] as $group) {
|
||||
if (isset($sub_row['groups'])) foreach ($sub_row['groups'] as $group) {
|
||||
$sql = "select count(*) as count from v_menu_item_groups ";
|
||||
$sql .= "where menu_item_uuid = '".$sub_row['uuid']."' ";
|
||||
$sql .= "and menu_uuid = '".$this->menu_uuid."' ";
|
||||
@@ -547,7 +547,7 @@ if (!class_exists('menu')) {
|
||||
//set the default menu_uuid
|
||||
$this->menu_uuid = 'b4750c3f-2a86-b00d-b7d0-345c14eca286';
|
||||
//check to see if any menu exists
|
||||
$sql = "select count(*) from v_menus ";
|
||||
$sql = "select count(*) as count from v_menus ";
|
||||
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
Reference in New Issue
Block a user