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

Bug #19148 "undefined variable result" / _wrapQuery / $result_class / $result_wrap_class
Submitted: 2011-12-20 09:26 UTC
From: danielc Assigned: danielc
Status: Closed Package: MDB2 (version SVN)
PHP Version: 5_4 SVN-2011-12-20 OS:
Roadmaps: 2.5.0b4    
Subscription  


 [2011-12-20 09:26 UTC] danielc (Daniel Convissor)
Description: ------------ The return from MDB2_Driver_Common::query() is a variable named $resource. Calling the method with the $result_class parameter set to false indicates one wants to get a raw resource (or mysqli_result) object returned. But changes to variable names in revision 288591 (addressing Bug #16508) produces a state where $result has not been set. Along the same lines, the intention behind the $result_wrap_class parameter and the setOption("result_wrap_class") is to have the MDB2_Result_Common derived class passed into the Iterator derived result_wrap_class. But the code's existing logic can produce a state where "new $result_wrap_class($result)" would have $result not being set, too. This is interrelated with Bug #18978 (as well as Bug #16508, mentioned above).

Comments

 [2011-12-20 09:30 UTC] danielc (Daniel Convissor)
ATTENTION: In the first sentence of the initial comment, I meant to say: "The return from MDB2_Driver_Common::_wrapQuery() is a variable named $resource."
 [2011-12-20 09:36 UTC] danielc (Daniel Convissor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: danielc
Fix committed in r321266.