If in fact code will be broken then yes, INI directive may be the only route.
However, I do not see why trailing spaces were being stripped in the first
place, as the original report indicates it does technically 'corrupt' the
data?
Ilia
On October 15, 2003 05:09 pm, Frank M. Kromann wrote:
> Hi Ilia,
>
> I think this will break code else where. And now the mssql, sybase and
> sybase_ct code handles trailing spaces differently.
>
> Would it make sence to create a flagin PHP.INI for this ?
>
> - Frank
>
> > iliaa Tue Oct 14 23:31:30 2003 EDT
> >
> > Modified files:
> > /php-src/ext/mssql php_mssql.c
> > Log:
> > Fixed bug #25777 (Do not rtrim() of text fields fetched from mssql)
> >
> >
> > Index: php-src/ext/mssql/php_mssql.c
> > diff -u php-src/ext/mssql/php_mssql.c:1.123
>
> php-src/ext/mssql/php_mssql.c:1.124
>
> > --- php-src/ext/mssql/php_mssql.c:1.123 Sun Aug 31 16:45:47 2003
> > +++ php-src/ext/mssql/php_mssql.c Tue Oct 14 23:31:29 2003
> > @@ -16,7 +16,7 @@
>
> +----------------------------------------------------------------------+
>
> > */
> >
> > -/* $Id: php_mssql.c,v 1.123 2003/08/31 20:45:47 iliaa Exp $ */
> > +/* $Id: php_mssql.c,v 1.124 2003/10/15 03:31:29 iliaa Exp $ */
> >
> > #ifdef COMPILE_DL_MSSQL
> > #define HAVE_MSSQL 1
> > @@ -786,9 +786,11 @@
> > 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;
> >
> > --
> > PHP CVS Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php