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  
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 : 47 + 11 = ?

 
 [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] 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!