From 4e0779d31ca5b513451ef4e207686a355d3f99ea Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 29 Apr 2015 06:33:48 +0000 Subject: [PATCH] Modify the delete permission. --- resources/classes/permissions.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/classes/permissions.php b/resources/classes/permissions.php index 11cfb18b75..465dd35dda 100644 --- a/resources/classes/permissions.php +++ b/resources/classes/permissions.php @@ -51,14 +51,13 @@ */ public function delete($permission) { if (!$this->exists($permission)) { - //$x = 0; - foreach($_SESSION["permissions"] as &$row) { + $x = 0; + foreach($_SESSION["permissions"] as $row) { if ($row['permission_name'] == $permission) { - unset($row); - //unset($_SESSION["permissions"][$x]); + unset($_SESSION["permissions"][$x]); break; } - //$x++; + $x++; } } }