Patch odbc-wvarchar-native-draft for ODBC related Bug #69975
Patch version 2015-07-02 14:17 UTC
Return to Bug #69975 |
Download this patch
Patch Revisions:
Developer: cmb@php.net
ext/odbc/php_odbc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 49432b6..4e5478e 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1014,6 +1014,12 @@ int odbc_bindcols(odbc_result *result)
NULL, 0, NULL, &displaysize);
}
#endif
+ /* Workaround for drivers that report size 0 for SQL_WVARCHAR columns */
+ if (result->values[i].coltype = SQL_WVARCHAR && displaysize == 0) {
+ result->values[i].value = NULL;
+ break;
+ }
+
/* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */
if (result->values[i].coltype == SQL_TIMESTAMP) {
displaysize += 3;
|