ID:               26926
 User updated by:  vania at pandorasdream dot com
 Reported By:      vania at pandorasdream dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Windows XP
 PHP Version:      5.0.0b3 (beta3)
 New Comment:

XPath queries have changed from returning arrays to returning
node-lists....

@ suppression of libxml is still required, which is correct behavior
for PHP5.

Vania


Previous Comments:
------------------------------------------------------------------------

[2004-01-16 13:39:47] vania at pandorasdream dot com

<?php
    $dom = new domdocument;
    $dom->loadHTMLFile("http://www.php.net/";);
    $xp = new domxpath($dom);
    $result = $xp->query("/html/head/title");
    print $result[0]->firstChild->data;
?>
//test requested without try/catch or suppression.
//Emailed to [EMAIL PROTECTED] per request, but since 
//it's not too much info, pasted here as well.  Above is 
//code block, and below is the result.

Warning: domdocument::loadHTMLFile() [function.loadHTMLFile]:
htmlParseEntityRef: expecting ';' in http://www.php.net/, line: 134 in
e:\PHP\projectcodewiki\www\test\loadhtmlsimple.php on line 3

Warning: domdocument::loadHTMLFile() [function.loadHTMLFile]:
htmlParseEntityRef: expecting ';' in http://www.php.net/, line: 134 in
e:\PHP\projectcodewiki\www\test\loadhtmlsimple.php on line 3

Warning: domdocument::loadHTMLFile() [function.loadHTMLFile]:
htmlParseEntityRef: no name in http://www.php.net/, line: 228 in
e:\PHP\projectcodewiki\www\test\loadhtmlsimple.php on line 3

Warning: domdocument::loadHTMLFile() [function.loadHTMLFile]:
Unexpected end tag : p in http://www.php.net/, line: 349 in
e:\PHP\projectcodewiki\www\test\loadhtmlsimple.php on line 3

Fatal error: Cannot use object of type domnodelist as array in
e:\PHP\projectcodewiki\www\test\loadhtmlsimple.php on line 6

------------------------------------------------------------------------

[2004-01-16 12:31:52] [EMAIL PROTECTED]

Can you remove the try/catch block as well as not surpress the errors.
Could you email me the errors as I believe you will have quite a few.

------------------------------------------------------------------------

[2004-01-16 08:15:44] vania at pandorasdream dot com

Reran using PHP5 version available as of January 16, 2004, 8:05:07 AM
East Coast Time, USA.  Results with the addition of the
var_dump(stream_get_wrappers()); in the catch block:

<b>Exception encountered</b><br>ERROR [2]domdocument::loadHTMLFile()
[<a href='function.loadHTMLFile'>function.loadHTMLFile</a>]:
htmlParseEntityRef: expecting ';' in http://www.php.net/, line: 118.
PHP 5.0.0RC1-dev (WINNT).  at line 5array(5) {
  [0]=>
  string(3) "php"
  [1]=>
  string(4) "file"
  [2]=>
  string(4) "http"
  [3]=>
  string(3) "ftp"
  [4]=>
  string(13) "compress.zlib"
}

Hope this helps...  Let me know if I can provide more info....

------------------------------------------------------------------------

[2004-01-15 17:20:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

If you encounter the error with a current snap, can you provide the
results of:
<?php
  var_dump(stream_get_wrappers());
?>

------------------------------------------------------------------------

[2004-01-15 16:02:12] vania at pandorasdream dot com

Sorry...  Wrong copy/paste for the actual result...

ERROR [2]domdocument::loadHTMLFile() [<a
href='function.loadHTMLFile'>function.loadHTMLFile</a>]:
htmlParseEntityRef: expecting ';' in http://www.php.net/, line: 118.
PHP 5.0.0RC1-dev (WINNT).  at line 5

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26926

-- 
Edit this bug report at http://bugs.php.net/?id=26926&edit=1

Reply via email to