Ticket #127 (closed defect: wontfix)
E_STRICT errors not caught by custom error handler
Description
I use a custom error handler to mute E_STRICT errors generated by PEAR but display E_STRICT errors caused by my own code.
Without Xcache this works fine. When using Xcache not all errors are caught by the custom error handler.
<?php
function myErrorHandler($no, $msg, $file, $line) {
if ($no == E_STRICT && strpos($file, '/pear/')) {
// PEAR isn't E_STRICT compatible, so just ignore E_STRICT errors there
return;
}
// Report error as usual
// ...
}
set_error_handler('myErrorHandler');
require_once 'PEAR.php';
?>
When Xcache is enabled, PHP prints two error messages:
Strict Standards: Assigning the return value of new by reference is deprecated in /var/www/test.peytz.dk/pear/PEAR.php on line 569
Strict Standards: Assigning the return value of new by reference is deprecated in /var/www/test.peytz.dk/pear/PEAR.php on line 572
This only happens the first time the script is run after the cache has been emptied.
Change History
Note: See
TracTickets for help on using
tickets.

