ID:               21477
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Analyzed
+Status:           Closed
 Bug Type:         DOM XML related
 Operating System: linux; kernel 2.4.18
 PHP Version:      4.3.0
 Assigned To:      
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

And fixed in CVS PHP_4_3 as well.


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

[2003-01-10 13:48:00] [EMAIL PROTECTED]

This is a valid bug, by initial conclusion as to the nature of this bug
was wrong.

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

[2003-01-10 12:54:57] [EMAIL PROTECTED]

You're not in position to decide what is bogus and what is not. This is
bogus.


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

[2003-01-10 12:50:17] [EMAIL PROTECTED]

Thanks for identifying the problem, chregu.
But your comment didn't specify WHICH $root in the sample code was
causing the problem.
Here's an example:
     <?php
     $xml=<<<eot
     <node attr="test"><test>hi</test>
     </node>
     eot;
     $doc = domxml_open_mem($xml);
     $root=$doc->document_element();
     //This won't work:
     //$nodeDump =$doc->dump_node($doc);  
     //This crashes:
     //$nodeDump =$root->dump_node($root);  
     //This works:
     $nodeDump =$doc->dump_node($root); 
     echo htmlentities($nodeDump);
     ?>

I have re-opened the bug for integrity of the bug database:
a bug is not 'Bogus' if PHP crashes due to scripting errors.
For the sake of others who get bitten, this should stay open until
fixed, then set it to 'Closed'.

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

[2003-01-10 11:56:45] [EMAIL PROTECTED]

The error is here:

$nodeContent =$root->dump_node($root); 

$root has to be a DOM_DOCUMENT and in your case it's DOM_ELEMENT.

I'll fix the code, so it will throw an error, if it's not a
DOM_DOCUMENT

chregu



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

[2003-01-10 04:44:37] [EMAIL PROTECTED]

modified bug title to be more specific

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

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/21477

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

Reply via email to