From: Nikita Popov Date: Mon, 5 Feb 2018 19:48:21 +0000 (+0100) Subject: Match strpos() behavior with mbstring.func_overload X-Git-Tag: php-7.3.0alpha1~468^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7fe32500e827bf75942114702880149087e1b45;p=php Match strpos() behavior with mbstring.func_overload mb_strpos() specifically emulates strpos() behavior when function overloading is enabled. However, the condition was not changed when strpos() behavior changed in PHP 7. --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 1e3649e2c5..0fb57b0165 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2819,7 +2819,7 @@ PHP_FUNCTION(mb_substr) } if (((MBSTRG(func_overload) & MB_OVERLOAD_STRING) == MB_OVERLOAD_STRING) - && (real_from >= mbfl_strlen(&string))) { + && (real_from > mbfl_strlen(&string))) { RETURN_FALSE; }