#46003 [Opn->Csd]: isset on nonexisting nodes return unexpected results

From: Date: Wed, 10 Sep 2008 16:30:53 +0000
Subject: #46003 [Opn->Csd]: isset on nonexisting nodes return unexpected results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128846@lists.php.net to get a copy of this message
ID: 46003 Updated by: rrichards@php.net Reported By: kiryl dot zhybul at gmail dot com -Status: Open +Status: Closed Bug Type: SimpleXML related Operating System: linux PHP Version: 5.2.6 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2008-09-05 15:17:45] 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) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46003&edit=1

« previous php.bugs (#128846) next »