diff --git a/ext/standard/string.c b/ext/standard/string.c index 017a26a0ee498..912e43dc93ced 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -420,6 +420,7 @@ PHP_FUNCTION(nl_langinfo) } } #endif +/* }}} */ #ifdef HAVE_STRCOLL /* {{{ proto int strcoll(string str1, string str2) @@ -2130,7 +2131,7 @@ PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC) t = str; if (PG(magic_quotes_sybase)) { - while (l >= 0) { + while (l > 0) { if(*t=='\'') { if((l>0) && (t[1]=='\'')) { t++; @@ -2141,6 +2142,7 @@ PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC) } *s++ = *t++; l--; + php_printf("%d\n",l); } *s = '\0';