summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-03-10 15:15:31 +0800
committerXinchen Hui <laruence@gmail.com>2017-03-10 15:15:31 +0800
commitc398198c0a8e58bc37a441bcfbfe1eb0e8058d9f (patch)
tree0272d4c336bc5432aca3e3b4bf8079ab5bdec920
parent9b16d4c9990af9b3e5c0988968768fbc0e4a58af (diff)
downloadphp-git-c398198c0a8e58bc37a441bcfbfe1eb0e8058d9f.tar.gz
Fixed bug #74218 (ArrayIterator error message is confusing)
-rw-r--r--ext/spl/spl_array.c2
-rw-r--r--ext/spl/tests/arrayObject_exchangeArray_basic3.phpt2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index fa3262d103..556878f0e1 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 ed2b8e89e1..d89ca821a2 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) {