|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35342 isset(DOMNodeList->length) returns false
Submitted: 2005-11-22 23:38 UTC Modified: 2005-11-23 09:23 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: Assigned: rrichards (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.1.0RC6 OS: FreeBSD
Private report: No CVE-ID: None
 [2005-11-22 23:38 UTC]
isset($DOMNodeList->length) seems to return false, all the time.

Reproduce code:
    $DOMDocument = new DOMDocument;

    $DOMNodeList = $DOMDocument->getElementsByTagName("foo");

    var_dump($DOMNodeList->length, isset($DOMNodeList->length));

Expected result:
int(2) bool(true) 

Actual result:
int(2) bool(false) 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 23:43 UTC]
Assigned to the maintainer.
 [2005-11-23 04:14 UTC]
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
Thank you for the report, and for helping us make PHP better.

 [2005-11-23 08:39 UTC]
Your fix doesnt seem to compile:

/bin/sh /usr/src/php51/libtool --preserve-dup-deps --mode=compile gcc  -Iext/dom/ -I/usr/src/php51/ext/dom/ -DPHP_ATOM_INC -I/usr/src/php51/include -I/usr/src/php51/main -I/usr/src/php51 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/src/php51/ext/date/lib -I/usr/src/php51/TSRM -I/usr/src/php51/Zend    -g -Wall  -prefer-non-pic -c /usr/src/php51/ext/dom/php_dom.c -o ext/dom/php_dom.lo
 gcc -Iext/dom/ -I/usr/src/php51/ext/dom/ -DPHP_ATOM_INC -I/usr/src/php51/include -I/usr/src/php51/main -I/usr/src/php51 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/src/php51/ext/date/lib -I/usr/src/php51/TSRM -I/usr/src/php51/Zend -g -Wall -c /usr/src/php51/ext/dom/php_dom.c -o ext/dom/.libs/php_dom.o
/usr/src/php51/ext/dom/php_dom.c: In function `dom_objects_set_class':
/usr/src/php51/ext/dom/php_dom.c:974: error: structure has no member named `guards'
*** Error code 1

 [2005-11-23 09:23 UTC]
Sorry, never mind me. My sources were bad.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Jan 19 16:01:25 2019 UTC