From: Ilia Alshanetsky Date: Wed, 15 Oct 2003 03:32:18 +0000 (+0000) Subject: MFH: Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). X-Git-Tag: php-4.3.4RC2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4191d2bde11957c6e845edaf01ca417ddad5fdb5;p=php MFH: Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql). --- 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;