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
 [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 17:00:01 2025 UTC