Prevents an error when groups session is not set

This commit is contained in:
FusionPBX 2024-04-20 17:06:05 -06:00 committed by GitHub
parent c87e40301b
commit 675ac2d433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,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;