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

Bug #877 AdminAuthMDB addUser fails with SQL problem
Submitted: 2004-02-26 13:54 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 : 35 - 33 = ?

 
 [2004-02-26 13:54 UTC] simon dot hamilton at ntlworld dot com
Description: ------------ Hi there I don't know how I got this to work before but now it doesn’t unless the following changes are made: Since the values passed are defaulted to NULL we should check that they are null before adding the value to the array. Without doing this we get a SQL query error. Here's a suggested fix. This may need done in the other containers as per the last fix. if (isset($this->authTableCols['is_active']) && !is_null($active)) { $col[] = $this->authTableCols['is_active']['name']; $val[] = $this->dbc->getValue($this->authTableCols['is_active']['type'], $active); } if (isset($this->authTableCols['owner_user_id']) && !is_null($owner_user_id)) { $col[] = $this->authTableCols['owner_user_id']['name']; $val[] = $this->dbc->getValue($this->authTableCols['owner_user_id']['name'], $owner_user_id); } if (isset($this->authTableCols['owner_group_id']) && !is_null($owner_group_id)) { $col[] = $this->authTableCols['owner_group_id']['name']; $val[] = $this->dbc->getValue($this->authTableCols['owner_group_id']['name'], $owner_group_id); } Reproduce code: --------------- N/A Expected result: ---------------- N/A Actual result: -------------- N/A

Comments

 [2004-02-26 14:01 UTC] lsmith
I made a typo fix. Check if things work now.
 [2004-02-26 16:18 UTC] simon dot hamilton at ntlworld dot com
Yeah that did the trick. Thanks Lukas.