Forum Moderators: coopster
I'm wondering if I'm missing something here...?!
I'm also setting a custom error handler with set_error_handler()
The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors','On');
trigger_error('This error is output - OK');
function __autoload($className) {
// At the point in question, error_reporting() was returning 0!
echo 'ERROR REPORTING IS SET TO: '.error_reporting();
trigger_error('This error is NOT output or logged!');
// Rest of script... include necessary file for class etc.
// If included file contained a fatal error NOTHING was logged - script justed halted here
}
@include 'somefile.php';
@include 'somefile.php';
<?php
require 'file_with_syntax_errors.php'; <<-- Script would halt here with fatal error
echo my_error_handling_function(); <<-- Won't execute
?>