mirror of
https://github.com/php/php-src.git
synced 2024-12-02 06:13:40 +08:00
ws fixes.
This commit is contained in:
parent
f6f58fc300
commit
868ae8b6e0
@ -2442,7 +2442,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
|
||||
target = new_str;
|
||||
|
||||
if (PG(magic_quotes_sybase)) {
|
||||
while (source<end) {
|
||||
while (source < end) {
|
||||
switch (*source) {
|
||||
case '\0':
|
||||
*target++ = '\\';
|
||||
@ -2458,11 +2458,9 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
|
||||
}
|
||||
source++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (source<end) {
|
||||
switch (*source)
|
||||
{
|
||||
} else {
|
||||
while (source < end) {
|
||||
switch (*source) {
|
||||
case '\0':
|
||||
*target++ = '\\';
|
||||
*target++ = '0';
|
||||
@ -3054,7 +3052,7 @@ PHP_FUNCTION(nl2br)
|
||||
|
||||
/* it is really faster to scan twice and allocate mem once insted scanning once
|
||||
and constantly reallocing */
|
||||
while (str<end) {
|
||||
while (str < end) {
|
||||
if (*str == '\r') {
|
||||
if (*(str+1) == '\n') {
|
||||
str++;
|
||||
@ -3079,9 +3077,8 @@ PHP_FUNCTION(nl2br)
|
||||
|
||||
str = Z_STRVAL_PP(zstr);
|
||||
|
||||
while (str<end) {
|
||||
switch (*str)
|
||||
{
|
||||
while (str < end) {
|
||||
switch (*str) {
|
||||
case '\r':
|
||||
case '\n':
|
||||
*target++ = '<';
|
||||
|
Loading…
Reference in New Issue
Block a user