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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jason at amp-design dot net
New email:
PHP Version: OS:

 

 [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 Apr 18 21:01:29 2024 UTC