com php-src: Fixed bug #74218 (ArrayIterator error message is confusing): ext/spl/spl_array.c ext/spl/tests/arrayObject_exchangeA rray_basic3.phpt
[email protected] (Xinchen Hui)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: c398198c0a8e58bc37a441bcfbfe1eb0e8058d9f Author: Xinchen Hui <[email protected]> Fri, 10 Mar 2017 15:15:31 +0800 Parents: 9b16d4c9990af9b3e5c0988968768fbc0e4a58af Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c398198c0a8e58bc37a441bcfbfe1eb0e8058d9f Log: Fixed bug #74218 (ArrayIterator error message is confusing) Bugs: https://bugs.php.net/74218 Changed paths: M ext/spl/spl_array.c M ext/spl/tests/arrayObject_exchangeArray_basic3.phpt Diff: diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index fa3262d..556878f 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1112,7 +1112,7 @@ static void spl_array_it_rewind(zend_object_iterator *iter) /* {{{ */ /* {{{ spl_array_set_array */ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *array, zend_long ar_flags, int just_array) { if (Z_TYPE_P(array) != IS_OBJECT && Z_TYPE_P(array) != IS_ARRAY) { - zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0); + zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object", 0); return; } diff --git a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt index ed2b8e8..d89ca82 100644 --- a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt +++ b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt @@ -105,7 +105,7 @@ array(1) { --> exchangeArray() with bad arg type: -Exception:Passed variable is not an array or object, using empty array instead +Exception:Passed variable is not an array or object Notice: Undefined variable: copy in %s on line 46 object(ArrayObject)#3 (1) {