From 8271890d8dd600a8b91fe41b2996ffdd878e2f6e Mon Sep 17 00:00:00 2001 From: "Edgar R. Sandi" Date: Fri, 26 Jun 2015 11:58:04 -0300 Subject: [PATCH] removed unreachable code in the substr_replace function --- ext/standard/string.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); } -- 2.50.1