From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.1.2
PHP Bug Type:     *Configuration Issues
Bug description:  trigger_error - Invalid error type specified

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 bug report at http://bugs.php.net/?id=16127&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16127&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16127&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16127&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16127&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16127&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16127&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16127&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16127&r=submittedtwice

Reply via email to