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

Bug #12780 DB connection instead DSN fails because of get_parent_class
Submitted: 2007-12-27 14:33 UTC
From: agorlov Assigned: dufuz
Status: Closed Package: Tree (version 0.3.2)
PHP Version: 5.1.6 OS: Linux
Roadmaps: (Not assigned)    

 [2007-12-27 14:33 UTC] agorlov (Alexandr Gorlov)
Description: ------------ Ive changed $GLOBALS['dsn'] -> $GLOBALS['db']. $GLOBALS['db'] is main database connection (DB) of my app: $tree = Tree::setup('Memory_DBnested', $GLOBALS['db'], array('table' => 'companyCategory', 'order' => 'id')); And my application was broken. In file Tree/OptionsDB.php: 95: if (get_parent_class($dsn) == 'db_common') { Function get_parent_class($dsn) returns 'DB_common' Ive patched it to: if (strtolower(get_parent_class($dsn)) == 'db_common') { So bug was crushed. ) In comments PHP (4 at least, dunno about 5) stores classnames in lower case, so: ... In files OptionsMDB.php and OptionsMDB2.php is the same code.


 [2008-03-23 16:07 UTC] dufuz (Helgi Þormar Þorbjörnsson)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.