|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mlovett at morpace dot com
New email:
PHP Version: OS:


 [2004-12-20 17:46 UTC] mlovett at morpace dot com
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:

   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");

Expected result:
I expected the the error message to be of type E_USER_ERROR, not E_USER_NOTICE.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-10 23:15 UTC]
Please try using this CVS snapshot:
For Windows:

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

 [2005-01-26 05:08 UTC]
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: Sat Jul 20 07:01:28 2024 UTC