mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Remove always-false condition from substr_replace()
l < 0 is checked before and set to a different value.
This commit is contained in:
parent
ea5521c68c
commit
e78966386b
@ -2171,7 +2171,7 @@ PHP_FUNCTION(substr_replace)
|
||||
}
|
||||
}
|
||||
|
||||
if ((size_t)l > ZSTR_LEN(str) || (l < 0 && (size_t)(-l) > ZSTR_LEN(str))) {
|
||||
if ((size_t)l > ZSTR_LEN(str)) {
|
||||
l = ZSTR_LEN(str);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user