diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-02-04 11:33:49 -0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-02-04 19:08:23 +0100 |
commit | ce1d69a1f6dcf15d43029301059c25e5bc09a577 (patch) | |
tree | 3df785771b4bfa07a9e270b04750840ed47f1cbf /ext/pcre | |
parent | 4861730a945908208a049b0c037ddf4a339f999a (diff) | |
download | php-git-ce1d69a1f6dcf15d43029301059c25e5bc09a577.tar.gz |
Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
Diffstat (limited to 'ext/pcre')
-rw-r--r-- | ext/pcre/tests/grep2.phpt | 2 | ||||
-rw-r--r-- | ext/pcre/tests/preg_replace_callback3.phpt | 4 | ||||
-rw-r--r-- | ext/pcre/tests/preg_replace_callback_array2.phpt | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/ext/pcre/tests/grep2.phpt b/ext/pcre/tests/grep2.phpt index 4155e2bc88..a739cb60ac 100644 --- a/ext/pcre/tests/grep2.phpt +++ b/ext/pcre/tests/grep2.phpt @@ -24,7 +24,7 @@ var_dump(preg_last_error() == PREG_RECURSION_LIMIT_ERROR); Warning: preg_grep() expects at most 3 parameters, 4 given in %sgrep2.php on line 3 NULL -Warning: preg_grep() expects parameter 2 to be array, integer given in %sgrep2.php on line 4 +Warning: preg_grep() expects parameter 2 to be array, int given in %sgrep2.php on line 4 NULL Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line 5 diff --git a/ext/pcre/tests/preg_replace_callback3.phpt b/ext/pcre/tests/preg_replace_callback3.phpt index fc3218b9e7..320fe3c77a 100644 --- a/ext/pcre/tests/preg_replace_callback3.phpt +++ b/ext/pcre/tests/preg_replace_callback3.phpt @@ -36,9 +36,9 @@ string(1) "3" Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d string(1) "3" -Warning: preg_replace_callback() expects parameter 4 to be integer, string given in %s on line %d +Warning: preg_replace_callback() expects parameter 4 to be int, string given in %s on line %d NULL -Warning: preg_replace_callback() expects parameter 4 to be integer, array given in %s on line %d +Warning: preg_replace_callback() expects parameter 4 to be int, array given in %s on line %d NULL Done diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt index 8e70bb06e8..5908eeb278 100644 --- a/ext/pcre/tests/preg_replace_callback_array2.phpt +++ b/ext/pcre/tests/preg_replace_callback_array2.phpt @@ -40,19 +40,19 @@ NULL Warning: preg_replace_callback_array() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: preg_replace_callback_array() expects parameter 1 to be array, integer given in %s on line %d +Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d NULL -Warning: preg_replace_callback_array() expects parameter 1 to be array, integer given in %s on line %d +Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d NULL -Warning: preg_replace_callback_array() expects parameter 1 to be array, integer given in %s on line %d +Warning: preg_replace_callback_array() expects parameter 1 to be array, int given in %s on line %d NULL -Warning: preg_replace_callback_array() expects parameter 3 to be integer, string given in %s on line %d +Warning: preg_replace_callback_array() expects parameter 3 to be int, string given in %s on line %d NULL -Warning: preg_replace_callback() expects parameter 4 to be integer, array given in %s on line %d +Warning: preg_replace_callback() expects parameter 4 to be int, array given in %s on line %d NULL string(0) "" |