PHP 5.4 error reporting fix