|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16127 trigger_error - Invalid error type specified
Submitted: 2002-03-17 11:21 UTC Modified: 2002-03-17 11:44 UTC
From: che at atlantic dot net Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.1.2 OS: Windows 2000
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: che at atlantic dot net
New email:
PHP Version: OS:


 [2002-03-17 11:21 UTC] che at atlantic dot net
Use the sample code below to reproduce the error.  The second parameter of trigger_error does not function, and the error type always shows up as '2'.  I witnessed this running on 4.10 and 4.12.


function ErrorHandler($number, $description, $file, $line) 
    $file = preg_replace('/\\\\/','/',$file);
    $message = $description . " at line " . $line . " in ". 
        $file . " and error type ".$number;
    print "<script language='JavaScript'>alert('$message')</script>";
    exit -1;



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-17 11:44 UTC]
RTM:  "It only works with the E_USER family of constants, and will default to E_USER_NOTICE."
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 05:05:45 2022 UTC