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

Bug #6286 Warning when using autoExecute()
Submitted: 2005-12-19 12:20 UTC
From: stoyan Assigned: lsmith
Status: Closed Package: MDB2
PHP Version: Irrelevant OS: Irrelevant
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 : 11 + 18 = ?

 
 [2005-12-19 12:20 UTC] stoyan
Description: ------------ Using autoExecute() I get the following PHP warning: ======= Warning: array_keys() [function.array-keys]: The first argument should be an array in path/to/pear/MDB2.php on line 3093 Warning: Invalid argument supplied for foreach() in path/to/pear/MDB2.php on line 3094 ====== The lines mentioned in the warning are in bindParamArray(). I think the problem is most likely in the way autoExecute() calls execute() autoExecute() does: $result =& $stmt->execute($result_class); while execute() expects result class as a second parameter and $values as a first parameter. Changing: $result =& $stmt->execute($result_class); to $result =& $stmt->execute(null, $result_class); fixed the problem for me.

Comments

 [2005-12-19 13:55 UTC] lsmith
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.