From 5c2f1e2a1ef208a15b7a1bb2474ee35b8a4be7c8 Mon Sep 17 00:00:00 2001 From: pkamps Date: Mon, 7 Jan 2019 17:19:43 +0100 Subject: [PATCH] FIX Bug : call count function on non countable variable (#128) * FIX Bug : call count function on non countable variable * Removing some un-used variables --- kernel/classes/ezpolicylimitation.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/classes/ezpolicylimitation.php b/kernel/classes/ezpolicylimitation.php index c5d5456fa11..cbb7034e4a0 100644 --- a/kernel/classes/ezpolicylimitation.php +++ b/kernel/classes/ezpolicylimitation.php @@ -201,7 +201,6 @@ function allValuesAsArrayWithNames() { $returnValue = null; $valueList = $this->attribute( 'values_as_array' ); - $names = array(); $policy = $this->attribute( 'policy' ); if ( !$policy ) { @@ -216,7 +215,6 @@ function allValuesAsArrayWithNames() return $returnValue; } $functions = $mod->attribute( 'available_functions' ); - $functionNames = array_keys( $functions ); $currentFunction = $policy->attribute( 'function_name' ); $limitationValueArray = array(); @@ -225,7 +223,7 @@ function allValuesAsArrayWithNames() if ( $limitation && isset( $limitation['class'] ) && - count( $limitation[ 'values' ] == 0 ) ) + count( $limitation[ 'values' ] ) == 0 ) { $obj = new $limitation['class']( array() ); $limitationValueList = call_user_func_array ( array( $obj , $limitation['function']) , $limitation['parameter'] );