In the following function call the log files show me that even though before the return call the variable has a value the variable receiving the return value is empty
the if empty has just been included because I didn't believe what is happening.
What am I missing? Any clou?
...
...
$workingProductArray=$this->placeNextItem($workingProductArray, ... );
if (empty($workingProductArray)){
write_log ("DYING array empty");
die(); //<-- and indeed the system dies.
}
}
private function placeNextItem(array $workingProductArray, ... )
{
if ($this->areAllProductsIgnored($workingProductArray)){
print_r($workingProductArray); // <-- SHOWS EXPECTED ARRAY AND VALUES
return $workingProductArray; // returning this value
}