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 09:33 UTC Modified: 2008-03-23 12:07 UTC
From: agorlov Assigned: dufuz
Status: Closed Package: Tree (version 0.3.2)
PHP Version: 5.1.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-12-27 09: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 http://ru2.php.net/get_parent_class: PHP (4 at least, dunno about 5) stores classnames in lower case, so: ... In files OptionsMDB.php and OptionsMDB2.php is the same code.

Comments

 [2008-03-23 12: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 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.