ID: 42082 Updated by: [EMAIL PROTECTED] Reported By: ms419 at freezone dot co dot uk -Status: Open +Status: Closed Bug Type: DOM XML related Operating System: Debian unstable PHP Version: 5.2.3 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: ------------------------------------------------------------------------ [2007-07-23 19:17:20] ms419 at freezone dot co dot uk Description: ------------ When NodeList length is int(0), empty($nodes->length) should be true Reproduce code: --------------- <?php $doc = new DOMDocument(); $xpath = new DOMXPath($doc); $nodes = $xpath->query('*'); var_dump($nodes); var_dump($nodes->length); var_dump(empty($nodes->length)); Expected result: ---------------- ket% php tmp.php object(DOMNodeList)#3 (0) { } int(0) bool(true) ket% Actual result: -------------- ket% php tmp.php object(DOMNodeList)#3 (0) { } int(0) bool(false) ket% ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42082&edit=1