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

Bug #10000 Undefined index: final_table, if a MDB2 Object is given
Submitted: 2007-02-01 08:37 UTC
From: berdir at php dot net Assigned: aashley
Status: Closed Package: Auth (version 1.5.0RC1)
PHP Version: 5.1.6 OS: Linux
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 : 33 - 13 = ?

 
 [2007-02-01 08:37 UTC] berdir at php dot net (Sascha Grossenbacher)
Description: ------------ If $this->options['dsn'] is a MDB2 object, $this->db is directly set in the constructor of Auth_Container_MDB2. In this case, $this->_connect() is never called and $this->options['final_xy'] will never be set. When removing the 4 lines in the constructor, everything works as expected. Test script: --------------- $options = array('dsn' => $mdb2Object, 'table' => 'auth', 'usernamecol' => 'username', 'passwordcol' => 'password', 'db_fields' => '*'); $auth = new Auth('MDB2', $options); $auth->start(); Expected result: ---------------- Successful login Actual result: -------------- PHP Error: Undefined index: final_table in /usr/share/php/Auth/Container/MDB2.php at line 317 PHP Error: Undefined index: final_usernamecol in /usr/share/php/Auth/Container/MDB2.php at line 318 MDB2 Error: syntax error _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT * FROM WHERE = '<Username>']

Comments

 [2007-02-02 00:49 UTC] aashley at php dot net (Adam Ashley)
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. Yeah i screwed that one up good.