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

Bug #4347 MDB and DB Containers fail to recognize if DB and MDB objects are passed as dsn
Submitted: 2005-05-15 02:54 UTC
From: prices at dflytech dot com Assigned: lsmith
Status: Closed Package: Auth
PHP Version: 5.0.4 OS: FreeBSD 5.3
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 19 - 12 = ?

 
 [2005-05-15 02:54 UTC] prices at dflytech dot com
Description: ------------ Auth 1.2.3 In both cases $dsn is a class. class 'DB' for the first one and 'MDB' for the second one. Reproduce code: --------------- in DB.php line 96: } elseif (get_parent_class($dsn) == "db_common") { in MDB.php line 95: } elseif (get_parent_class($dsn) == "mdb_common") { Expected result: ---------------- DB.php $dsn is recognized as a DB class. MDB.php $dsn is recognized as an MDB class. Actual result: -------------- The first one fails because get_parent_class($dsn) returns "DB_Common" not "db_common". The second one fails because get_parent_class($dsn) returns "MDB_Common" not "mdb_common". I patched it by putting a strtolower around get_parent_class($dsn).

Comments

 [2005-05-27 13:30 UTC] post at mark-wiesemann dot de
Seems to be PHP 5 problem. PHP 4 gives the class name in lower case, PHP 5 in the "right" (original) case. Using strtolower() as suggested should fix this problem for PHP 5.
 [2006-01-08 11:54 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!