Bug #16127 Updated: trigger_error - Invalid error type specified

From: Date: Sun, 17 Mar 2002 16:44:41 +0000
Subject: Bug #16127 Updated: trigger_error - Invalid error type specified
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2688@lists.php.net to get a copy of this message
ID: 16127 Updated by: sander@php.net Reported By: che@atlantic.net -Status: Open +Status: Bogus Bug Type: *Configuration Issues Operating System: Windows 2000 PHP Version: 4.1.2 New Comment: RTM: "It only works with the E_USER family of constants, and will default to E_USER_NOTICE." Previous Comments: ------------------------------------------------------------------------ [2002-03-17 11:21:15] che@atlantic.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. set_error_handler('ErrorHandler'); 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; } trigger_error("Testing",E_ERROR); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16127&edit=1

« previous php.bugs (#2688) next »