php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46003 isset on nonexisting nodes return unexpected results
Submitted: 2008-09-05 15:17 UTC Modified: 2008-09-10 16:30 UTC
From: kiryl dot zhybul at gmail dot com Assigned:
Status: Closed Package: SimpleXML related
PHP Version: 5.2.6 OS: linux
Private report: No CVE-ID: None
 [2008-09-05 15:17 UTC] kiryl dot zhybul at gmail dot com
Description:
------------
isset on nonexisting nodes return unexpected results

Reproduce code:
---------------
$a = simplexml_load_string("
        <r>
                <p>Test</p>
                <o d='h'>
                          <xx rr='info' />
                          <yy rr='data' />
                </o>
        </r>
");

var_dump(isset($a->o->zz));
var_dump(isset($a->o->text));

Expected result:
----------------
bool(false)
bool(false)

Actual result:
--------------
bool(false)
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-10 16:30 UTC] rrichards@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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC