Browse Source

Permission [Class] - Updates for PHP 8.1

fusionate 2 years ago
parent
commit
2825ae6f59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resources/classes/permissions.php

+ 1 - 1
resources/classes/permissions.php

@@ -69,7 +69,7 @@ if (!class_exists('permissions')) {
 			//set default false
 				$result = false;
 			//search for the permission
-				if (is_array($_SESSION["permissions"]) && isset($_SESSION["permissions"][$permission])) {
+				if (!empty($_SESSION["permissions"]) && is_array($_SESSION["permissions"]) && isset($_SESSION["permissions"][$permission])) {
 					$result = true;
 				}
 			//return the result