]> granicus.if.org Git - php/commitdiff
remove useless check
authorAnatol Belski <ab@php.net>
Mon, 29 Jun 2015 09:24:11 +0000 (11:24 +0200)
committerAnatol Belski <ab@php.net>
Mon, 29 Jun 2015 10:15:20 +0000 (12:15 +0200)
thanks Yasuo :)

ext/standard/string.c

index ba402e3e98345d7be4fad8d720a28648726ca5d2..0a5e8bec4dbcf5194a1cf98af83c07cbf53af804 100644 (file)
@@ -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;