From a28b1f6d3abf3f2db1cb2c54ba750b94fb6e08c8 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 10 Feb 2008 14:49:23 +0000 Subject: [PATCH] Possible fix for bug #43861 --- ext/mssql/php_mssql.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 986c2520e5a..7987046982a 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) {