From: Edgar R. Sandi Date: Fri, 26 Jun 2015 14:58:04 +0000 (-0300) Subject: removed unreachable code in the substr_replace function X-Git-Tag: php-7.1.0alpha3~25^2~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8271890d8dd600a8b91fe41b2996ffdd878e2f6e;p=php removed unreachable code in the substr_replace function --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 93e0f19e45..6c5e58e2bb 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2501,9 +2501,7 @@ PHP_FUNCTION(substr_replace) } } - if (f > Z_STRLEN_P(str) || (f < 0 && -f > Z_STRLEN_P(str))) { - RETURN_FALSE; - } else if (l > Z_STRLEN_P(str) || (l < 0 && -l > Z_STRLEN_P(str))) { + if (l > Z_STRLEN_P(str) || (l < 0 && -l > Z_STRLEN_P(str))) { l = Z_STRLEN_P(str); }