From: mlovett at morpace dot com Operating system: Fedora Core 2 PHP version: 5.0.1 PHP Bug Type: *General Issues Bug description: trigger_error ignores e_user_error
Description: ------------ trigger_error("my message",E_USER_ERROR) reports "my message" as a PHP Notice, not an error, when used inside an exception handler. Reproduce code: --------------- ini_set("error_log","/var/www/html/indigo/weblog"); ini_set("log_errors","1"); ini_set("display_errors","0"); function handleException($e) { trigger_error("EXCEPTION THROWN: " . $e->getMessage(),E_USER_ERROR); // want exception messages to go to same spot as errors Header("Location: bailout.php"); exit; } set_exception_handler("handleException"); Expected result: ---------------- I expected the the error message to be of type E_USER_ERROR, not E_USER_NOTICE. -- Edit bug report at http://bugs.php.net/?id=31206&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31206&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31206&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31206&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31206&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31206&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31206&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31206&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31206&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31206&r=support Expected behavior: http://bugs.php.net/fix.php?id=31206&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31206&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31206&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31206&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31206&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31206&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31206&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31206&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31206&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31206&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31206&r=mysqlcfg