Skip to content

Commit c398198

Browse files
committed
Fixed bug #74218 (ArrayIterator error message is confusing)
1 parent 9b16d4c commit c398198

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/spl/spl_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ static void spl_array_it_rewind(zend_object_iterator *iter) /* {{{ */
11121112
/* {{{ spl_array_set_array */
11131113
static void spl_array_set_array(zval *object, spl_array_object *intern, zval *array, zend_long ar_flags, int just_array) {
11141114
if (Z_TYPE_P(array) != IS_OBJECT && Z_TYPE_P(array) != IS_ARRAY) {
1115-
zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0);
1115+
zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object", 0);
11161116
return;
11171117
}
11181118

ext/spl/tests/arrayObject_exchangeArray_basic3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ array(1) {
105105

106106

107107
--> exchangeArray() with bad arg type:
108-
Exception:Passed variable is not an array or object, using empty array instead
108+
Exception:Passed variable is not an array or object
109109

110110
Notice: Undefined variable: copy in %s on line 46
111111
object(ArrayObject)#3 (1) {

0 commit comments

Comments
 (0)