Skip to content

Commit 280b3db

Browse files
authored
Use same type error wording for alias iterable in ZPP (#8838)
Follow-up from #7309 as I didn't change the ZPP TypeError wording.
1 parent 804c708 commit 280b3db

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Zend/tests/iterable_or_null.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ try {
4040

4141
?>
4242
--EXPECT--
43-
zend_iterable(): Argument #1 ($arg1) must be of type iterable, string given
44-
zend_iterable(): Argument #1 ($arg1) must be of type iterable, int given
45-
zend_iterable(): Argument #1 ($arg1) must be of type iterable, null given
46-
zend_iterable(): Argument #2 ($arg2) must be of type ?iterable, string given
43+
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, string given
44+
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, int given
45+
zend_iterable(): Argument #1 ($arg1) must be of type Traversable|array, null given
46+
zend_iterable(): Argument #2 ($arg2) must be of type Traversable|array|null, string given
4747

Zend/zend_API.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,8 @@ static zend_always_inline zval *zend_try_array_init(zval *zv)
13191319
_(Z_EXPECTED_ARRAY_OR_NULL, "of type ?array") \
13201320
_(Z_EXPECTED_ARRAY_OR_LONG, "of type array|int") \
13211321
_(Z_EXPECTED_ARRAY_OR_LONG_OR_NULL, "of type array|int|null") \
1322-
_(Z_EXPECTED_ITERABLE, "of type iterable") \
1323-
_(Z_EXPECTED_ITERABLE_OR_NULL, "of type ?iterable") \
1322+
_(Z_EXPECTED_ITERABLE, "of type Traversable|array") \
1323+
_(Z_EXPECTED_ITERABLE_OR_NULL, "of type Traversable|array|null") \
13241324
_(Z_EXPECTED_FUNC, "a valid callback") \
13251325
_(Z_EXPECTED_FUNC_OR_NULL, "a valid callback or null") \
13261326
_(Z_EXPECTED_RESOURCE, "of type resource") \

0 commit comments

Comments
 (0)