From:             bugs dot php dot net at webdevelopers dot cz
Operating system: Linux version 2.6.6 
PHP version:      5.0.5
PHP Bug Type:     DOM XML related
Bug description:  invalid feof() results due to Zend's caching of user stream 
wrappers

Description:
------------
HTML imported using DOMDocument::loadHTML() is not saved as valid XML
using DOMDocument::saveXML()

Reproduce code:
---------------
header('Content-Type: text/plain; charset=UTF-8');

$d=new DOMDocument('1.0', 'UTF-8');
if ($d->loadHTML('<html><body><script><!-- var a=1; a--;
--></script></body></html>')) {
  echo "loadHTML: OK\n";
  echo $d->loadXML($d->saveXML());
}

Expected result:
----------------
loadHTML: OK
1


Actual result:
--------------
loadHTML: OK
<br />
<b>Warning</b>:  DOMDocument::loadXML() [<a
href='function.loadXML'>function.loadXML</a>]: Comment not terminated 
&lt;!-- var a=1; a in Entity, line: 3 in <b>test.php</b> on line
<b>9</b><br />

-- 
Edit bug report at http://bugs.php.net/?id=34664&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34664&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34664&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34664&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34664&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34664&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34664&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34664&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34664&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34664&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34664&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34664&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34664&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34664&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34664&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34664&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34664&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34664&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34664&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34664&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34664&r=mysqlcfg

Reply via email to