]> granicus.if.org Git - php/commitdiff
fix weird DB2 issue:
authorAntony Dovgal <tony2001@php.net>
Mon, 17 Jan 2005 18:08:54 +0000 (18:08 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 17 Jan 2005 18:08:54 +0000 (18:08 +0000)
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

index 6020959e4f73fd08c3f0a75f688983e509e86ec2..46825a53aac73d693fa4c90fbfeb3360c159ea2f 100644 (file)
@@ -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);
 
 }
 /* }}} */