cvs: php4(PHP_4_2_0) /ext/standard string.c

From: Date: Thu, 28 Mar 2002 07:48:51 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10739@lists.php.net to get a copy of this message
derick Thu Mar 28 02:48:51 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard string.c Log: - MFH for bug 16314 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.263.2.2 php4/ext/standard/string.c:1.263.2.3 --- php4/ext/standard/string.c:1.263.2.2 Tue Mar 26 03:57:18 2002 +++ php4/ext/standard/string.c Thu Mar 28 02:48:50 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.263.2.2 2002/03/26 08:57:18 derick Exp $ */ +/* $Id: string.c,v 1.263.2.3 2002/03/28 07:48:50 derick Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2120,10 +2120,6 @@ int l; char escape_char='\\'; - if (PG(magic_quotes_sybase)) { - escape_char='\''; - } - if (len != NULL) { l = *len; } else { @@ -2131,6 +2127,26 @@ } s = str; t = str; + + if (PG(magic_quotes_sybase)) { + while (l >= 0) { + if(*t=='\'') { + if((l>0) && (t[1]=='\'')) { + t++; + if (len != NULL) + (*len)--; + l--; + } + } + *s++ = *t++; + l--; + } + *s = '\0'; + + return; + } + + while (l > 0) { if (*t == escape_char) { t++; /* skip the slash */

« previous php.cvs (#10739) next »