mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Fixed bug #20528.
This commit is contained in:
parent
7732ce7fe3
commit
c7dd366c1a
@ -1269,9 +1269,7 @@ PHP_FUNCTION(preg_split)
|
||||
add_offset_pair(return_value, &Z_STRVAL_PP(subject)[start_offset], Z_STRLEN_PP(subject) - start_offset, start_offset);
|
||||
} else {
|
||||
/* Add the last piece to the return value */
|
||||
add_next_index_stringl(return_value,
|
||||
&Z_STRVAL_PP(subject)[start_offset],
|
||||
Z_STRLEN_PP(subject) - start_offset, 1);
|
||||
add_next_index_stringl(return_value, last_match, Z_STRVAL_PP(subject) + Z_STRLEN_PP(subject) - last_match, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user