diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-02-04 16:42:36 -0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-02-04 23:09:40 +0100 |
commit | fef879a2d63899ed25f39b4581c16682afdd0a8f (patch) | |
tree | ce12aa17bbd2db3d0cfd2cabda46e4bcdb074686 /ext/mbstring/tests/mb_strrichr_variation3.phpt | |
parent | ce1d69a1f6dcf15d43029301059c25e5bc09a577 (diff) | |
download | php-git-fef879a2d63899ed25f39b4581c16682afdd0a8f.tar.gz |
Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which
implements the same change for integer->int.
Diffstat (limited to 'ext/mbstring/tests/mb_strrichr_variation3.phpt')
-rw-r--r-- | ext/mbstring/tests/mb_strrichr_variation3.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/mbstring/tests/mb_strrichr_variation3.phpt b/ext/mbstring/tests/mb_strrichr_variation3.phpt index 3949c148d1..5f73dc4da7 100644 --- a/ext/mbstring/tests/mb_strrichr_variation3.phpt +++ b/ext/mbstring/tests/mb_strrichr_variation3.phpt @@ -161,19 +161,19 @@ string(12) "737472696e67" string(12) "737472696e67" --empty array-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) NULL --int indexed array-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) NULL --associative array-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) NULL --nested arrays-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) NULL --uppercase NULL-- @@ -213,11 +213,11 @@ string(12) "737472696e67" string(12) "737472696e67" --instance of classWithToString-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, object given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d) NULL --instance of classWithoutToString-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, object given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d) NULL --undefined var-- @@ -227,6 +227,6 @@ string(8) "5f76616c" string(8) "5f76616c" --resource-- -Error: 2 - mb_strrichr() expects parameter 3 to be boolean, resource given, %s(%d) +Error: 2 - mb_strrichr() expects parameter 3 to be bool, resource given, %s(%d) NULL ===DONE=== |