Update device_vendor_function_edit.php

Prevent a warning that was discovered in the Admin Training.
This commit is contained in:
FusionPBX 2017-01-29 13:31:15 -07:00 committed by GitHub
parent 2fb79825ea
commit 9fc3541382
1 changed files with 7 additions and 5 deletions

View File

@ -198,8 +198,8 @@
$sql .= "where device_vendor_function_uuid = '$device_vendor_function_uuid' "; $sql .= "where device_vendor_function_uuid = '$device_vendor_function_uuid' ";
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute(); $prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $device_vendor_functions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) { foreach ($device_vendor_functions as &$row) {
//$label = $row["label"]; //$label = $row["label"];
$name = $row["name"]; $name = $row["name"];
$value = $row["value"]; $value = $row["value"];
@ -232,9 +232,11 @@
unset($sql, $prep_statement); unset($sql, $prep_statement);
//set the assigned_groups array //set the assigned_groups array
foreach($menu_item_groups as $field) { if (is_array($menu_item_groups)) {
if (strlen($field['group_name']) > 0) { foreach($menu_item_groups as $field) {
$assigned_groups[] = $field['group_uuid']; if (strlen($field['group_name']) > 0) {
$assigned_groups[] = $field['group_uuid'];
}
} }
} }