summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbstring.stub.php
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-04-02 22:38:28 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-04-02 22:40:00 +0200
commit656046873c9316aae2970fb2997edaafa60478e7 (patch)
treed8b6dd294d9a12b41a44a55e50806b2ce51fb074 /ext/mbstring/mbstring.stub.php
parent165fde9a37a89ebedfb4da32855747e6e70edc18 (diff)
downloadphp-git-656046873c9316aae2970fb2997edaafa60478e7.tar.gz
Refactor mb_substr_count()
Promote empty needle warning to ValueError Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug Thus mb_substr_count() can only return int now, fix stubs accordingly
Diffstat (limited to 'ext/mbstring/mbstring.stub.php')
-rw-r--r--ext/mbstring/mbstring.stub.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php
index aa2c7dc0e4..dfc920eb96 100644
--- a/ext/mbstring/mbstring.stub.php
+++ b/ext/mbstring/mbstring.stub.php
@@ -39,7 +39,7 @@ function mb_stristr(string $haystack, string $needle, bool $part = false, string
function mb_strrichr(string $haystack, string $needle, bool $part = false, string $encoding = UNKNOWN): string|false {}
-function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int|false {}
+function mb_substr_count(string $haystack, string $needle, string $encoding = UNKNOWN): int {}
function mb_substr(string $str, int $start, ?int $length = null, string $encoding = UNKNOWN): string|false {}