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

Bug #15115 __wakeup passes the wrong params to connect
Submitted: 2008-11-21 17:10 UTC
From: jonty Assigned: aharvey
Status: Closed Package: DB (version 1.7.14RC1)
PHP Version: 5.2.5 OS: Linux
Roadmaps: 1.7.14RC2    
Subscription  


 [2008-11-21 17:10 UTC] jonty
Description: ------------ The __wakeup method in DB/common.php passes the ->options array to ->connect(). ->connect() takes a boolean ($persistent), not an array of options. This means that any deserialised DB connection will always reconnect in persistent mode. Attached is a patch to fix this, written in a manner that should deal with both old and new style calls to ->connect().

Comments

 [2009-02-07 20:18 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified
How annoying. The best bet here is to call similar code to DB::connect($foo, $options); and that's a lot of duplication. The attached patch might scrape through, because the serialized object will have lots of properties and options stored with it too.
 [2010-12-24 11:43 UTC] aharvey (Adam Harvey)
-Status: Verified +Status: Closed -Assigned To: +Assigned To: aharvey -Roadmap Versions: +Roadmap Versions: 1.7.14RC2
This bug has been fixed in SVN. 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.