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 /tests/lang | |
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 'tests/lang')
-rw-r--r-- | tests/lang/bug24658.phpt | 2 | ||||
-rw-r--r-- | tests/lang/func_get_arg_variation.phpt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index b089569d91..a53457d5d9 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,7 +53,7 @@ int(2) object(foo)#%d (0) { } -Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, int given in %s:%d Stack trace: #0 [internal function]: typehint(1, 1) #1 %s(%d): array_walk(Array, 'typehint') diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt index 3dab69f246..83b20848fe 100644 --- a/tests/lang/func_get_arg_variation.phpt +++ b/tests/lang/func_get_arg_variation.phpt @@ -20,7 +20,7 @@ Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d -Warning: func_get_arg() expects parameter 1 to be integer, string given in %s on line %d +Warning: func_get_arg() expects parameter 1 to be int, string given in %s on line %d Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d |