#35342 [Asn->Csd]: isset(DOMNodeList->length) returns false
ID: 35342
Updated by: bjori@php.net
Reported By: bjori@php.net
-Status: Assigned
+Status: Closed
Bug Type: DOM XML related
Operating System: FreeBSD
PHP Version: 5.1.0RC6
Assigned To: rrichards
New Comment:
Sorry, never mind me. My sources were bad.
Previous Comments:
------------------------------------------------------------------------
[2005-11-23 08:39:23] bjori@php.net
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 04:14:35] 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.
------------------------------------------------------------------------
[2005-11-22 23:43:07] tony2001@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2005-11-22 23:38:31] bjori@php.net
Description:
------------
isset($DOMNodeList->length) seems to return false, all the time.
Reproduce code:
---------------
<?php
$DOMDocument = new DOMDocument;
$DOMDocument->loadXML("<root><foo>foobar</foo><foo>foobar#2</foo></root>");
$DOMNodeList = $DOMDocument->getElementsByTagName("foo");
var_dump($DOMNodeList->length, isset($DOMNodeList->length));
?>
Expected result:
----------------
int(2) bool(true)
Actual result:
--------------
int(2) bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35342&edit=1
Thread (5 messages)