php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32428 The @ warning error supression operator is broken
Submitted: 2005-03-23 13:46 UTC Modified: 2005-06-06 13:21 UTC
From: jason at amp-design dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-03-23 (dev) OS: Cent OS 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 3 = ?
Subscribe to this entry?

 
 [2005-03-23 13:46 UTC] jason at amp-design dot net
Description:
------------
The @ operator that is used to supress errors about warnings and other non critical errors such as notices seems to be broken in this mornings snapshot of 5.1.0. This is quite fustrating as it's handy to use the @ operator when you want pass NULL when the variable doesn't exist.



Reproduce code:
---------------
<?php $data = @$not_exists; ?>

Expected result:
----------------
$data is assigned with NULL without an error message

Actual result:
--------------
Notice: Undefined variable: not_exists in /data/web/tools/iq_framework/test.php on line 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-23 16:46 UTC] tony2001@php.net
I can confirm this issue.
(reproducible in HEAD only) 
 [2005-06-06 13:21 UTC] dmitry@php.net
Fixed in CVS HEAD.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC