momo Mon Mar 31 13:56:41 2003 EDT
Modified files:
/php4/ext/standard string.c
Log:
fix for 22904
@ now addslashes() do it also on cybase magic mode(moshe).
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.365 php4/ext/standard/string.c:1.366
--- php4/ext/standard/string.c:1.365 Mon Mar 31 07:08:31 2003
+++ php4/ext/standard/string.c Mon Mar 31 13:56:41 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.365 2003/03/31 12:08:31 momo Exp $ */
+/* $Id: string.c,v 1.366 2003/03/31 18:56:41 momo Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -2331,13 +2331,18 @@
l--;
}
*s++ = *t++;
- } else if (*t == '\\' && l > 0 && t[1] == '0') {
+ } else if (*t == '\\' && l > 0) {
+ if(t[1] == '0') {
*s++='\0';
- t += 2;
- if (len != NULL) {
- (*len)--;
- }
- l--;
+ t++;
+ } else {
+ *s++=*(++t);
+ }
+ t++;
+ if (len != NULL) {
+ (*len)--;
+ }
+ l--;
} else {
*s++ = *t++;
}
@@ -2627,6 +2632,10 @@
case '\'':
*target++ = '\'';
*target++ = '\'';
+ break;
+ case '\\':
+ *target++ = '\\';
+ *target++ = '\\';
break;
default:
*target++ = *source;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php