From: Trevor O. <tr...@gm...> - 2010-07-21 16:47:29
|
I set up our software platform where I work to email me whenever a serious error occurs. I set up a class that handles errors: <?php class CZ_ErrorHandler{ public static function handleError($errno, $errstr, $errfile, $errline, $errcontext){ ... } } set_error_handler(array('CZ_ErrorHandler','handleError')); ?> set_error_handler does allow an array as an argument to handle all errors. I put this at the top of each php page: <?php require_once('CZ/ErrorHandler.php'); ... ?> It's the first file included in each page, and it links to the code above. However, I get this error when exporting to XLS through pear: *Fatal error*: Class 'CZ_ErrorHandler' not found in * /usr/share/pear/Spreadsheet/Excel/Writer/Workbook.php* on line *180 *The ONLY place where set_error_handler is in the CZ/ErrorHandler.php file. The script wouldn't know to use my error handler unless it had first declared that class. So how the heck is this error happening? -Trevor |