Doc #19303 [Opn]: Using an indexed type array with assoc or object fetch doesn't set types
| From: | mike at silverorange dot com | Date: | Thu, 25 Oct 2012 10:19:06 +0000 |
| Subject: | Doc #19303 [Opn]: Using an indexed type array with assoc or object fetch doesn't set types | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9236@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19303&edit=1
ID: 19303
Updated by: mike@silverorange.com
Reported By: mike at silverorange dot com
Summary: Using an indexed type array with assoc or object
fetch doesn't set types
Status: Open
Type: Documentation Problem
Package: MDB2
Operating System: Irrelevant
Package Version: SVN
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
What doesn't work in the patch? In MDB2 2.4.x, enumerated arrays of
types worked
with assoc and object fetch methods.
Previous Comments:
------------------------------------------------------------------------
[2012-10-25 02:21:15] danielc
-Type: Bug
+Type: Documentation Problem
This is by design.
The code in the each driver's fetchRow() method and in
MDB2_Result_Common::setResultTypes() are explicitly constructed to have
enumerated arrays of types go with enumerated arrays of results and have
associative arrays of types go with associative and object results.
That aside, a modified version of the provided patch doesn't work for
me.
I added some tests in commit r328136. The unsupported variations are
commented out.
The documentation could (well, should) be better about explaining this,
so I'll convert it to a documentation ticket.
------------------------------------------------------------------------
[2012-02-23 19:57:46] gauthierm
Added #patch
bug:19303;patch:MDB2-indexed-types-assoc-fetch;revision:1330027066;.
------------------------------------------------------------------------
[2012-02-23 18:37:24] gauthierm
Added #patch
bug:19303;patch:MDB2-indexed-types-assoc-fetch;revision:1330022244;.
------------------------------------------------------------------------
[2012-02-23 18:35:55] gauthierm
Description:
------------
Using an indexed type array with assoc or object fetch doesn't set
types. The
returned results are all strings rather than the specified types.
Using an associative types array works correctly.
The attached patch fixes the issue in SVN trunk
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19303&edit=1