#40682 [NEW]: set_error_handler doesn't respect @ operator
| From: | quintenbernaert at gmail dot com | Date: | Thu, 01 Mar 2007 16:59:03 +0000 |
| Subject: | #40682 [NEW]: set_error_handler doesn't respect @ operator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-109756@lists.php.net to get a copy of this message | ||
From: quintenbernaert at gmail dot com
Operating system: Linux
PHP version: 4.4.6
PHP Bug Type: Scripting Engine problem
Bug description: set_error_handler doesn't respect @ operator
Description:
------------
set_error_handler doesn't respect the @ operator and it should respect it.
The @ does ignore errors of that function. set_error_handler report errors.
But if I put an @ before a function, set_error_handler still show the error
and it shouldn't show it.
Reproduce code:
---------------
<?php
function errors($errno, $errstr, $errfile, $errline)
{
echo 'Error handler<br /><br />
'.$errno.'<br />
'.$errstr.'<br />
'.$errfile.'<br />
'.$errline.'<br />';
}
set_error_handler("errors");
@getimagesize();
?>
Expected result:
----------------
Empty page.
Actual result:
--------------
Error handler
2
Wrong parameter count for getimagesize()
/home/quinten/www/problem_errorhandler.php
14
--
Edit bug report at http://bugs.php.net/?id=40682&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40682&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40682&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40682&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40682&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40682&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40682&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40682&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40682&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40682&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40682&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40682&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40682&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40682&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40682&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40682&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40682&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40682&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40682&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40682&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40682&r=mysqlcfg