Bug #17932: No way to determine @ operator usage from within custom errors handler
| From: | flying at dom dot natm dot ru | Date: | Sun, 23 Jun 2002 09:41:19 +0000 |
| Subject: | Bug #17932: No way to determine @ operator usage from within custom errors handler | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11827@lists.php.net to get a copy of this message | ||
From: flying@dom.natm.ru
Operating system: Windows 2000
PHP version: 4.2.1
PHP Bug Type: Scripting Engine problem
Bug description: No way to determine @ operator usage from within custom errors handler
There is currently no way for custom error handler function to determine,
if expression which generate any particular error was called using @
operator or not.
For example there will be no difference between:
$fp = fopen('unavailable_file','r');
and
$fp = @fopen('unavailable_file','r');
Warning will be thrown in both cases, while it must be only thrown into
first case, as requested by programmer. So there must be some way to
distinguish these cases.
Normally error_reporting() function should return 0, being called from
custom error handler in a case, when @ operator was used, but it returns
error reporting level, which is by default. I think it is wrong behaviour
and it should be improved in a way, described before.
--
Edit bug report at http://bugs.php.net/?id=17932&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17932&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17932&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17932&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17932&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17932&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17932&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17932&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17932&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17932&r=globals