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

Bug #857 Bug in addUser in LiveUser_Admin_Auth_Container_MDB
Submitted: 2004-02-26 01:15 UTC
From: simon dot hamilton at ntlworld dot com Assigned: lsmith
Status: Closed Package: LiveUser
PHP Version: 4.3.3 OS: ANY
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-26 01:15 UTC] simon dot hamilton at ntlworld dot com
Description: ------------ As per my email to the list... The ['name'] key was missing from the vars used in the INSERT...perhaps due to some copy/paste^h^h^h^h^h^h^h^h^h^hporting from the DB container :). Here's the diff to fix it: --- MDB.php.new 2004-02-26 00:08:59.656250000 +0000 +++ MDB.php 2004-02-26 00:08:25.578125000 +0000 @@ -223,17 +223,17 @@ $col = $val = ''; if (isset($this->authTableCols['is_active'])) { - $col[] = $this->authTableCols['is_active']['name']; + $col[] = $this->authTableCols['is_active']; $val[] = $this->dbc->getValue('boolean', $active); } if (isset($this->authTableCols['owner_user_id'])) { - $col[] = $this->authTableCols['owner_user_id']['name']; + $col[] = $this->authTableCols['owner_user_id']; $val[] = $this->dbc->getValue('integer', $owner_user_id); } if (isset($this->authTableCols['owner_group_id'])) { - $col[] = $this->authTableCols['owner_group_id']['name']; + $col[] = $this->authTableCols['owner_group_id']; $val[] = $this->dbc->getValue('integer', $owner_group_id); } Hope this helps! Reproduce code: --------------- n/a Expected result: ---------------- An Auth user id. Actual result: -------------- a SQL error causing arrays to get added to the query.

Comments

 [2004-02-26 01:17 UTC] simon dot hamilton at ntlworld dot com
lol....I did it again. Here's the patch the right way around. --- MDB.php 2004-02-26 00:08:25.578125000 +0000 +++ MDB.php.new 2004-02-26 00:08:59.656250000 +0000 @@ -223,17 +223,17 @@ $col = $val = ''; if (isset($this->authTableCols['is_active'])) { - $col[] = $this->authTableCols['is_active']; + $col[] = $this->authTableCols['is_active']['name']; $val[] = $this->dbc->getValue('boolean', $active); } if (isset($this->authTableCols['owner_user_id'])) { - $col[] = $this->authTableCols['owner_user_id']; + $col[] = $this->authTableCols['owner_user_id']['name']; $val[] = $this->dbc->getValue('integer', $owner_user_id); } if (isset($this->authTableCols['owner_group_id'])) { - $col[] = $this->authTableCols['owner_group_id']; + $col[] = $this->authTableCols['owner_group_id']['name']; $val[] = $this->dbc->getValue('integer', $owner_group_id); } -- Simon H
 [2004-02-26 09:35 UTC] lsmith
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.