[TYPO3-core] RFC: bug #1326

Martin Kutschker Martin.Kutschker at blackbox.net
Fri Feb 24 21:36:20 CET 2006


Wolfgang Klinger <wolfgang at stufenlos.net> writes on 
Fri, 24 Feb 2006 19:58:51 +0100 (MET):

> 
> 
> *hiya!*
> 
> Type: bugfix
> 
> 
> "Passed variable is not an array or object" warnings in
> "array_merge_recursive_overrule"
> BT reference: http://bugs.typo3.org/view.php?id=1326
> 
> I don't like this kind of patches, but we are on the save 
> side with that though.


But why do we need it? Obviously the calling code is broken (or at least sloppy). If we countinue with this style we end up testing for an array 50% of the CPU cycles.

-1

I suggest we modify Bernhard's idea of the error handler. We do no fancy stuff like notification but enhance the PHP output by doing a backtrace

function handleError(errno,errstr) {
echo errstr.'<br/>Backtrace:';
t3lib_div::print_array(debug_backtrace());
return false;
}

set_error_handler("handleError");

So the real offender can be found.

Note: this is PHP 4.3+

Masi




More information about the TYPO3-team-core mailing list