php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44952 isset() does not checks correctly variable variable
Submitted: 2008-05-09 08:00 UTC Modified: 2008-05-12 09:10 UTC
From: vesko at webstudiobulgaria dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3CVS-2008-05-09 (snap) OS: Debian Lenny
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vesko at webstudiobulgaria dot com
New email:
PHP Version: OS:

 

 [2008-05-09 08:00 UTC] vesko at webstudiobulgaria dot com
Description:
------------
When giving variable variable argument to isset() it is not checking correctly.
It was working property with the snap from 21 February (and of course works correctly with php 5.2 branch).

Reproduce code:
---------------
<?
$var_name = 'unexisting';
if(isset($$var_name))
    {
    print $$var_name;
    }
?>

Expected result:
----------------
//print nothing

Actual result:
--------------
Notice: Undefined variable: unexisting in /home/local/test/t3.php on line 5

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-12 09:09 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 18:00:01 2025 UTC