PHP: Fix error handler in PHP 5.3