Edit report at https://pear.php.net/bugs/bug.php?id=19148&edit=1
ID: 19148
Updated by: danielc@analysisandsolutions.com
Reported By: danielc at analysisandsolutions dot com
Summary: "undefined variable result" / _wrapQuery /
$result_class / $result_wrap_class
Status: Open
Type: Bug
Package: MDB2
Package Version: SVN
PHP Version: 5_4 SVN-2011-12-20
Roadmap Versions:
New Comment:
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."
Previous Comments:
------------------------------------------------------------------------
[2011-12-20 04:26:10] danielc
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).
------------------------------------------------------------------------