after doing a database restore, the permission may not yet exist (#6930)

This commit is contained in:
frytimo 2024-03-28 11:59:30 -03:00 committed by GitHub
parent 2cfbe63a5f
commit ff55a36980
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ if (!class_exists('permissions')) {
* @var string $permission
*/
public function delete($permission, $type) {
if ($this->exists($permission)) {
if ($this->exists($permission) && !empty($_SESSION["permissions"][$permission])) {
if ($type === "temp") {
if ($_SESSION["permissions"][$permission] === "temp") {
unset($_SESSION["permissions"][$permission]);