Zoop 1.5 - Live Error handler broken

The live Error Handler in Zoop 1.5 in error.php crashes when trying to process the $sGlobals variable if $sGlobals contains objects or classes. On line 234 the foreach loop assumes each value it gets will be a string, but this is not always true in my apps. When it gets to {$value} the error handler crashes and never writes the log file. The simple fix is listed below, but this took me a couple hours to figure out since it cannot output the error. I will check this into the Zoop 1.5 branch.

foreach ($values as $name => $value)
{
	if(is_string($value)) {
		$ret .= "<tr><td>\n\t{$var}->{$name}</td><td>\n\t{$value}</td></tr>\n";
	} else {
		$ret .= "<tr><td>\n\t{$var}->{$name}</td><td>\n\t".var_export($value, true)."</td></tr>\n";
	}
}

Also remove assign by reference

The assign by reference is deprecated so I am also going to remove them when I check in the error.php. There is no reason to use it assign the variables which are being assigned are not being modified.


//$src =& $$var;
$src = $$var;

jmorant@cloud9l... 18 Mar 2010