|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-28 15:13 UTC] tm at nanosoft dot com dot pl
[2005-11-28 17:53 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 21:00:01 2025 UTC |
Description: ------------ Functions ibase_fetch_object, ibase_fetch_row return wrong values when there is an empty string ('') in firebird table. When there is a 'null' value in the table this problem doesn't occure. PHP ver. 5.0.0 works fine, problem is in ver 5.0.4 and higher. In this example in record number 3 there is value from record number 1 instead of empty string (''). Reproduce code: --------------- CREATE TABLE test_table (test_field VARCHAR(10)) Insert 4 records into test_table rec_no|test_field ------------------ 1 | 'test1' 2 | 'test2' 3 | '' 4 | 'test4' ------------------ $sql_string = "SELECT test_field FROM test_table"; $connection = ibase_connect($database, $user, $pass); $dbo = ibase_query($connection, $sql_string); while ( $oRow = ibase_fetch_object($dbo) ) { var_dump($oRow); } Expected result: ---------------- { ["TEST_FIELD"]=> string(5) "test1" } { ["TEST_FIELD"]=> string(5) "test2" } { ["TEST_FIELD"]=> string(0) "" } { ["TEST_FIELD"]=> string(5) "test4" } Actual result: -------------- { ["TEST_FIELD"]=> string(5) "test1" } { ["TEST_FIELD"]=> string(5) "test2" } { ["TEST_FIELD"]=> string(5) "test1" } { ["TEST_FIELD"]=> string(5) "test4" }