php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31206 trigger_error ignores e_user_error
Submitted: 2004-12-20 17:46 UTC Modified: 2005-01-26 05:08 UTC
From: mlovett at morpace dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.0.1 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2004-12-20 17:46 UTC] mlovett at morpace dot com
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-10 23:15 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

What does this code output for you?
<?php 
trigger_error("my message",E_USER_ERROR);
?> 

 [2005-01-26 05:08 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC