From 4f92cb5b18121651c0575d7f085adeaef5b62353 Mon Sep 17 00:00:00 2001 From: Ruben Barkow-Kuder Date: Thu, 25 Aug 2022 16:29:54 +0200 Subject: [PATCH] fix Only variables should be assigned by reference In PHP 8 this throws a warning and it seems like the ampersand is not needed there at all anyway. Or what was the purpose of the pointer here? --- gacl.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gacl.class.php b/gacl.class.php index 4cdc4a6..0bbda12 100644 --- a/gacl.class.php +++ b/gacl.class.php @@ -451,7 +451,7 @@ function acl_query($aco_section_value, $aco_value, $aro_section_value, $aro_valu return FALSE; } - $row =& $rs->FetchRow(); + $row = $rs->FetchRow(); /* * Return ACL ID. This is the key to "hooking" extras like pricing assigned to ACLs etc... Very useful. @@ -468,7 +468,7 @@ function acl_query($aco_section_value, $aco_value, $aro_section_value, $aro_valu $allow = FALSE; } - $retarr = array('acl_id' => &$row[0], 'return_value' => &$row[2], 'allow' => $allow); + $retarr = array('acl_id' => $row[0], 'return_value' => $row[2], 'allow' => $allow); } else { // Permission denied. $retarr = array('acl_id' => NULL, 'return_value' => NULL, 'allow' => FALSE);