From:             [EMAIL PROTECTED]
Operating system: linux; kernel 2.4.18
PHP version:      4.3.0
PHP Bug Type:     DOM XML related
Bug description:  $node->dump_node($node) crashes when node has any attribute

<?php
// this text causes crash:
$with_attr=<<<eot
<node attr="test"><test>hi</test>
</node>
eot;
// this text avoids crash:
$without_attr=<<<eot
<node><test>hi</test>
</node>
eot;
// using $with_attr causes crash:
$xml=$with_attr;
// using $without_attr doesn't crash:
// $xml=$without_attr;
$doc = domxml_open_mem($xml);
$root=$doc->root();
// the following dump_node() call causes crash:
$nodeContent =$root->dump_node($root); 
// the following dump_mem() call succeeds, using $with_attr:
//$nodeContent =$doc->dump_mem();
echo htmlentities($nodeContent);
// php appears to have crashed; the following text is not printed: 
echo "hi";
?>

I am using PHP 4.3.0 configured as:
./configure --with-dom --with-zlib-dir=/usr/include
--with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs
--with-xml --enable-track-vars
-- 
Edit bug report at http://bugs.php.net/?id=21477&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21477&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21477&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21477&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21477&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21477&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21477&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21477&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21477&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21477&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21477&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21477&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21477&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21477&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21477&r=gnused

Reply via email to