From:             michael at gostev dot name
Operating system: Linux RedHat 7.3
PHP version:      4.3.4
PHP Bug Type:     Class/Object related
Bug description:  'aggregate' doesn't work properly

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 bug report at http://bugs.php.net/?id=26686&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26686&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26686&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26686&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26686&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26686&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26686&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26686&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26686&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26686&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26686&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26686&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26686&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26686&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26686&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26686&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26686&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26686&r=float

Reply via email to