ID:               26686
 Updated by:       [EMAIL PROTECTED]
 Reported By:      michael at gostev dot name
-Status:           Open
+Status:           Feedback
-Bug Type:         Class/Object related
+Bug Type:         Scripting Engine problem
 Operating System: Linux RedHat 7.3
 PHP Version:      4.3.4
 New Comment:

Please try using this CVS snapshot:

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




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

[2003-12-21 20:27:18] michael at gostev dot name

Description:
------------
Following code cause 
Fatal error: Call to undefined function:  document_element()

If we swap line 1 and line 2 code working properly

Reproduce code:
---------------
class DomDocumentAux {}

class DomNodeAux {}

function DOMTreeRoot( $text )
{
  $doc=domxml_open_mem($text);

/* line 1 */  aggregate($doc,'DomDocumentAux');

/* line 2 */  $root=$doc->document_element();

  aggregate($root,'DomNodeAux');
}

$b = '<PARAMETERS></PARAMETERS>';
$a='<ROOT></ROOT>';

DOMTreeRoot($a);
DOMTreeRoot($b);




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


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

Reply via email to