Bug #69498 [Opn->Csd]: odbc_fetch_array returns field values in array keys
| From: | asears at conestogawood dot com | Date: | Wed, 27 May 2015 14:17:53 +0000 |
| Subject: | Bug #69498 [Opn->Csd]: odbc_fetch_array returns field values in array keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192918@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69498&edit=1
ID: 69498
User updated by: asears at conestogawood dot com
Reported by: asears at conestogawood dot com
Summary: odbc_fetch_array returns field values in array keys
-Status: Open
+Status: Closed
Type: Bug
Package: ODBC related
Operating System: Linux (Gentoo Base 2.2/Kernel 4)
PHP Version: 5.5.24
Block user comment: N
Private report: N
New Comment:
Fixed in PHP 5.5.25.
Previous Comments:
------------------------------------------------------------------------
[2015-05-27 14:16:57] asears at conestogawood dot com
Appears to have been fixed in PHP-5.5.25.
------------------------------------------------------------------------
[2015-05-22 18:51:46] theodoreb at goshen dot edu
Any updates on this bug? The function works as expected on PHP-5.4.32, unixODBC-2.3.2, SQL Server
2008R2 SP1, Gentoo Linux. So looks like PHP-5.5.x is the culprit.
------------------------------------------------------------------------
[2015-04-21 13:40:42] asears at conestogawood dot com
Description:
------------
Using PHP-5.5.24, unixODBC 2.3.2, IBM iSeriesAccess 1.1.0.2
odbc_fetch_array returns the field values as the array keys instead of the column names as expected.
Test script:
---------------
$odbc = odbc_connect('AS400', '', '');
$result = odbc_exec($odbc, "SELECT * FROM SYSIBM.SYSCHARSETS");
var_dump(odbc_fetch_array($result));
Expected result:
----------------
(result using PHP-5.5.23)
array(4) {
["CHARACTER_SET_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["CHARACTER_SET_NAME"]=>
string(8) "SQL_TEXT"
["DEFAULT_COLLATE_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["DEFAULT_COLLATE_NAME"]=>
string(8) "SQL_TEXT"
}
Actual result:
--------------
(result using PHP-5.5.24)
array(2) {
["INFORMATION_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["SQL_TEXT"]=>
string(8) "SQL_TEXT"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69498&edit=1