Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.4

Bug #490 Recursions not managed
Submitted: 2003-12-24 12:29 UTC
From: coil at strangebuzz dot com Assigned: fredericpoeydomenge
Status: Closed Package: Var_Dump
PHP Version: 4.3.4 OS: 2K + Easy PHP 1.7
Roadmaps: (Not assigned)    
Subscription  


 [2003-12-24 12:29 UTC] coil at strangebuzz dot com
Description: ------------ When Dumping an object that contains cross reference, it bugs. ( because of recursions ) Reproduce code: --------------- class class1 { var $string = 'Kikoo1'; var $Classe2Tab = array(); function class1() { print($this->string); } function ajoutObject2() { $this->Classe2Tab[] = new class2($this); } } class class2 { var $string = 'Kikoo2'; var $Class1ObjectRef = null; function class2(& $Class1Object) { $this->Class1ObjectRef = & $Class1Object; print("contr class2<br>"); } function class2_func() { print("class2_func()<br>"); $this->Class1ObjectRef->class1_func(); } } $obj1 = new class1(); $obj1->ajoutObject2(); $obj1->ajoutObject2(); $obj1->ajoutObject2(); $obj1->ajoutObject2(); /* print('<pre>'); print_r($obj1); print('</pre>'); * */ Var_Dump::display($obj1); //Debug::DumpObj($obj1,'$obj1'); //Debug::DumpArr($obj1,'$obj1'); Expected result: ---------------- Classe should manage recurcions as print_r function does. Actual result: -------------- Make Apache crash !!

Comments

 [2004-04-19 08:25 UTC] marceman at gmx dot at
Any Chance this gets fixed soon ?
 [2004-04-28 14:41 UTC] frederic dot poeydomenge at free dot fr
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php Complete refactoring of the class in v0.9 : now the package directly captures the output of the var_dump function, by using output control functions, and so the recursion is managed through the use of var_dump.