Bug->Doc #19303 [Opn]: Using an indexed type array with assoc or object fetch doesn't set types

From: Date: Thu, 25 Oct 2012 01:21:16 +0000
Subject: Bug->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-9231@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: danielc@analysisandsolutions.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: Bug +Type: Documentation Problem Package: MDB2 Operating System: Irrelevant Package Version: SVN PHP Version: Irrelevant Roadmap Versions: New Comment: -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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.pear.bugs (#9231) next »