Your function definition:
function initFiles( $project )
Your function call:
initFiles( $node, $project );
So, the function use $node
as $project
, but $node
doesn't have ->fileListArray
property array, so your array_push()
fails.
And, in the future, don't forget to activate error checking in our php code:
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
With error checking, your original code output this error:
PHP Warning: array_push() expects parameter 1 to be array, object given in ...