Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
4.3.0
-
None
-
eZ Publish 4.3
Description
hi,
kernel/classes/ezcontentobjecttreenode.php
Line 3095
</code>
if ( count( $nodeListArray ) > 0 )
</code>
we somehow made it that nodelistarray was FALSE and a count on FALSE returns 1. it was joining the if clause even if nodelistarray was FALSE.
additional you can add a check for the existance of the variable?
patch could look like this:
if ( is_array($nodeListArray) && count( $nodeListArray ) > 0 )
or
if ( $nodeListArray and count( $nodeListArray ) > 0 )
Steps to reproduce
<?php
$testArr = FALSE;
echo count($testArr);
?>
Will output: 1