com php-src: removed unreachable code in the substr_replace function: ext/standard/string.c

From: Date: Mon, 29 Jun 2015 08:27:41 +0000
Subject: com php-src: removed unreachable code in the substr_replace function: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87606@lists.php.net to get a copy of this message
Commit: 8271890d8dd600a8b91fe41b2996ffdd878e2f6e Author: Edgar R. Sandi <edgar.r.sandi@gmail.com> Fri, 26 Jun 2015 11:58:04 -0300 Committer: Anatol Belski <ab@php.net> Mon, 29 Jun 2015 10:27:41 +0200 Parents: 8e923197b48a200eb7cdb0f07d5e7d1a6533b12d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8271890d8dd600a8b91fe41b2996ffdd878e2f6e Log: removed unreachable code in the substr_replace function Changed paths: M ext/standard/string..c Diff: diff --git a/ext/standard/string.c b/ext/standard/string..c index 93e0f19..6c5e58e 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); }

« previous php.cvs (#87606) next »