Check if setting exists before trying to count (#7071)

Co-authored-by: Tim Fry <tim@fusionpbx.com>
This commit is contained in:
frytimo 2024-07-26 15:13:19 -03:00 committed by GitHub
parent ce26f227bf
commit 16574221b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@
//set default false
$result = false;
//search for the permission
if (count($_SESSION["groups"]) > 0) {
if (isset($_SESSION["groups"]) && count($_SESSION["groups"]) > 0) {
foreach ($_SESSION["groups"] as $row) {
if ($row['group_name'] == $group) {
$result = true;