#50729 [NEW]: Error Control Operator (@) Does Not Work With Custom Error Handler
From: keithdavis at solidtechservice dot com
Operating system: Windows 7 64 Bit
PHP version: 5.3.1
PHP Bug Type: Scripting Engine problem
Bug description: Error Control Operator (@) Does Not Work With Custom Error Handler
Description:
------------
The @ is supposed to set error level to 0 (at least, I think that is what
it supposed to do), but that does not work with a custom error handler. I
can reproduce this every time.
Reproduce code:
---------------
Set error handler:
set_error_handler('ErrorHandler');
Code to generate error:
$this->_bind = @ldap_bind($this->_conn,
$this->_ad_username.$this->_account_suffix, $this->_ad_password);
Error Handler Test:
function ErrorHandler($iErrorNum, $sErrorMsg, $sErrorFile,
$iErrorLineNum){
echo $iErrorNum;
}
Expected result:
----------------
No error message and an $iErroNum of 0.
Actual result:
--------------
error message:
WARNING [2] ldap_bind(): Unable to bind to server: Can't contact LDAP
server, Line: 140 in file
C:\inetpub\Intranet_Local\library\classes\adLDAP.php
$iErrorNum = 1024
--
Edit bug report at http://bugs.php.net/?id=50729&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50729&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50729&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50729&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50729&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50729&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50729&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50729&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50729&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50729&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50729&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50729&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50729&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50729&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50729&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50729&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50729&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50729&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50729&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50729&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50729&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50729&r=mysqlcfg
Thread (8 messages)
- keithdavis at solidtechservice dot com