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

Bug #11500 Tree/Memory.php method getElementContent() not working
Submitted: 2007-07-02 09:45 UTC
From: rudis Assigned: dufuz
Status: Closed Package: Tree (version 0.3.1)
PHP Version: 4.3.11 OS: Mac OS X 10.4
Roadmaps: (Not assigned)    
Subscription  


 [2007-07-02 09:45 UTC] rudis (Simon Ruderich)
Description: ------------ Hi, in the file Tree/Memory.php there is a bug in the method getElementContent() because of wrong variable names. I attached a bug which fixes this. Thanks for your work, Simon

Comments

 [2007-07-02 09:48 UTC] rudis (Simon Ruderich)
Hm, attaching the path is not working, here the patch as text: --- Tree/Memory.php 2007-06-30 20:31:10.000000000 +0200 +++ Tree/Memory.php 2007-06-30 20:31:13.000000000 +0200 @@ -1025,9 +1025,9 @@ function getElementContent($idOrPath, $fieldName) { if (is_string($idOrPath)) { - $id = $this->getIdByPath($idOrPath); + $idOrPath = $this->getIdByPath($idOrPath); } - return $this->data[$id][$fieldName]; + return $this->data[$idOrPath][$fieldName]; } // }}}
 [2007-07-02 10:06 UTC] rudis (Simon Ruderich)
Now I tried it again with a different file extension and adding the patch worked. Sorry for the mess. Simon
 [2007-08-11 21:38 UTC] dufuz (Helgi Þormar)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.