Skip to content

Use same type error wording for alias iterable in ZPP #8838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Zend/tests/iterable_or_null.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ try {

?>
--EXPECT--
zend_iterable(): Argument #1 ($arg1) must be of type iterable, string given
zend_iterable(): Argument #1 ($arg1) must be of type iterable, int given
zend_iterable(): Argument #1 ($arg1) must be of type iterable, null given
zend_iterable(): Argument #2 ($arg2) must be of type ?iterable, string given
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, string given
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, int given
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, null given
zend_iterable(): Argument #2 ($arg2) must be of type Traversable|array|null, string given

4 changes: 2 additions & 2 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,8 @@ static zend_always_inline zval *zend_try_array_init(zval *zv)
_(Z_EXPECTED_ARRAY_OR_NULL, "of type ?array") \
_(Z_EXPECTED_ARRAY_OR_LONG, "of type array|int") \
_(Z_EXPECTED_ARRAY_OR_LONG_OR_NULL, "of type array|int|null") \
_(Z_EXPECTED_ITERABLE, "of type iterable") \
_(Z_EXPECTED_ITERABLE_OR_NULL, "of type ?iterable") \
_(Z_EXPECTED_ITERABLE, "of type Traversable|array") \
_(Z_EXPECTED_ITERABLE_OR_NULL, "of type Traversable|array|null") \
_(Z_EXPECTED_FUNC, "a valid callback") \
_(Z_EXPECTED_FUNC_OR_NULL, "a valid callback or null") \
_(Z_EXPECTED_RESOURCE, "of type resource") \
Expand Down