Skip to content

Commit

Permalink
FIX Bug : call count function on non countable variable (ezsystems#128)
Browse files Browse the repository at this point in the history
* FIX Bug : call count function on non countable variable

* Removing some un-used variables
  • Loading branch information
pkamps authored Jan 7, 2019
1 parent d265434 commit 5c2f1e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/classes/ezpolicylimitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ function allValuesAsArrayWithNames()
{
$returnValue = null;
$valueList = $this->attribute( 'values_as_array' );
$names = array();
$policy = $this->attribute( 'policy' );
if ( !$policy )
{
Expand All @@ -216,7 +215,6 @@ function allValuesAsArrayWithNames()
return $returnValue;
}
$functions = $mod->attribute( 'available_functions' );
$functionNames = array_keys( $functions );

$currentFunction = $policy->attribute( 'function_name' );
$limitationValueArray = array();
Expand All @@ -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'] );
Expand Down

0 comments on commit 5c2f1e2

Please sign in to comment.