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

Bug #3463 query disregards parameters
Submitted: 2005-02-14 17:00 UTC
From: mculey at jccc dot net Assigned: dufuz
Status: Closed Package: DB_ldap
PHP Version: 5.0.3 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 : 30 - 10 = ?

 
 [2005-02-14 17:00 UTC] mculey at jccc dot net
Description: ------------ Function query does not pass on the parameters passed to it when calling simpleQuery. This causes all queries to the ldap store to return ALL parameters, ignoring the list of parameters passed in. Reproduce code: --------------- Changed line 606 from: $result = $this->simpleQuery($query); to: $result = $this->simpleQuery($query, $action, $params); Expected result: ---------------- $result should contain only the parameters I've requested in the function call.

Comments

 [2005-06-03 06:18 UTC] Jan dot Blaha at karosa dot iveco dot com
First two lines of query method solves the issue. In the release, they are commented out. I don't know the reason behind this. But applying following trivial patch solves the issue. *** ldap.php Fri Jun 03 08:06:23 2005 --- ldap.php.orig Fri Jun 03 08:06:52 2005 *************** *** 594,601 **** * @see DB_common::prepare() $this->execute()$this->simpleQuery() */ function &query($query, $data = array(), $action = null, $params = array()) { ! $this->q_action = $action ? $action : $this->action; ! $this->q_params = $params; if (sizeof($data) > 0) { $sth = $this->prepare($query); if (DB::isError($sth)) { --- 594,601 ---- * @see DB_common::prepare() $this->execute()$this->simpleQuery() */ function &query($query, $data = array(), $action = null, $params = array()) { ! // $this->q_action = $action ? $action : $this->action; ! // $this->q_params = $params; if (sizeof($data) > 0) { $sth = $this->prepare($query); if (DB::isError($sth)) {
 [2008-03-24 20:02 UTC] dufuz (Helgi Þormar Þorbjörnsson)
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.