]> granicus.if.org Git - php/commitdiff
removed unreachable code in the substr_replace function
authorEdgar R. Sandi <edgar.r.sandi@gmail.com>
Fri, 26 Jun 2015 14:58:04 +0000 (11:58 -0300)
committerAnatol Belski <ab@php.net>
Mon, 29 Jun 2015 08:27:41 +0000 (10:27 +0200)
ext/standard/string.c

index 93e0f19e454fba2571eb2fae581b1ab1b8d4d69e..6c5e58e2bb3dd54dbad2eaff9c9dbee9d6145444 100644 (file)
@@ -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);
                        }