diff options
Diffstat (limited to 'ext/spl/spl_array.c')
| -rwxr-xr-x | ext/spl/spl_array.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 7e930fd74f..f1f2a82af7 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1010,16 +1010,18 @@ SPL_METHOD(Array, __construct) zval **array; long ar_flags = 0; zend_class_entry *ce_get_iterator = spl_ce_Iterator; + zend_error_handling error_handling; if (ZEND_NUM_ARGS() == 0) { return; /* nothing to do */ } - zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, &error_handling TSRMLS_CC); intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|lC", &array, &ar_flags, &ce_get_iterator) == FAILURE) { + zend_restore_error_handling(&error_handling TSRMLS_CC); return; } @@ -1031,6 +1033,8 @@ SPL_METHOD(Array, __construct) spl_array_set_array(object, intern, array, ar_flags, ZEND_NUM_ARGS() == 1 TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); + } /* }}} */ |
