From 4191d2bde11957c6e845edaf01ca417ddad5fdb5 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 15 Oct 2003 03:32:18 +0000 Subject: [PATCH] MFH: Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). --- NEWS | 1 + ext/mssql/php_mssql.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index b7517c550e..4a3a72fa26 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP 4 NEWS - Fixed bug #25800 (parse_url() could not parse urls with empty port). (Ilia) - Fixed bug #25780 (ext/session: invalid "session.cookie_lifetime" makes session_start() to crash in win32). (Jani) +- Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). (Ilia) - Fixed bug #25770 (Segfault with PHP and bison 1.875). (eggert@gnu.org, Marcus) - Fixed bug #25764 (ldap_get_option() crashes with unbound ldap link). (Jani) - Fixed bug #25758 (var_export does not escape ' & \ inside array keys). (Ilia) diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 177437602f..1956b22af4 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -784,9 +784,11 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off char *data = charcol(offset); length=dbdatlen(mssql_ptr->link,offset); +#if ilia_0 while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */ length--; } +#endif Z_STRVAL_P(result) = estrndup(data,length); Z_STRLEN_P(result) = length; Z_TYPE_P(result) = IS_STRING; -- 2.40.0