summaryrefslogtreecommitdiff
path: root/ext/mssql/php_mssql.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r--ext/mssql/php_mssql.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index 986c2520e5..7987046982 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -890,6 +890,10 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
DBDATEREC dateinfo;
int res_length = dbdatlen(mssql_ptr->link,offset);
+ if (res_length == -1) {
+ res_length = 255;
+ }
+
if ((column_type != SQLDATETIME && column_type != SQLDATETIM4) || MS_SQL_G(datetimeconvert)) {
switch (column_type) {