From: Anatol Belski Date: Mon, 29 Jun 2015 09:24:11 +0000 (+0200) Subject: remove useless check X-Git-Tag: php-7.1.0alpha3~25^2~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2ac0304a9699dfa41d87bdfcdd93585003eb8d3;p=php remove useless check thanks Yasuo :) --- diff --git a/ext/standard/string.c b/ext/standard/string.c index ba402e3e98..0a5e8bec4d 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2484,7 +2484,7 @@ PHP_FUNCTION(substr_replace) * of the string */ if (f < 0) { - if (f < 0 && -f > Z_STRLEN_P(str)) { + if (-f > Z_STRLEN_P(str)) { f = 0; } else { f = Z_STRLEN_P(str) + f;