From 7c152b6a8e96e25d8a75a7b7a2ea5c3cad76af7a Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 17 Jan 2005 18:08:54 +0000 Subject: [PATCH] fix weird DB2 issue: DB2's SQLDataSources() returns _max available_ length of result string instead of _real_ length and that results in strings a-la "\0 " --- ext/odbc/php_odbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 6020959e4f..46825a53aa 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1232,8 +1232,8 @@ PHP_FUNCTION(odbc_data_source) array_init(return_value); - add_assoc_stringl_ex(return_value, "server", sizeof("server"), server_name, len1, 1); - add_assoc_stringl_ex(return_value, "description", sizeof("description"), desc, len2, 1); + add_assoc_string_ex(return_value, "server", sizeof("server"), server_name, 1); + add_assoc_string_ex(return_value, "description", sizeof("description"), desc, 1); } /* }}} */ -- 2.50.1