mirror of
https://github.com/php/php-src.git
synced 2026-04-29 19:23:22 +02:00
Remove unnecessary haystack length check in stripos()
This falls out naturally from the following condition, because either the needle length will be zero as well, or the needle will be longer than the (empty) haystack.
This commit is contained in:
@@ -1940,10 +1940,6 @@ PHP_FUNCTION(stripos)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (ZSTR_LEN(haystack) == 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (ZSTR_LEN(needle) == 0 || ZSTR_LEN(needle) > ZSTR_LEN(haystack)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user