Skip to content

Commit 3919b16

Browse files
committed
MFH: Fix #46241 (stacked error_handlers, error_handling in general)
1 parent 202426a commit 3919b16

25 files changed

+182
-47
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ PHP NEWS
4141
endian systems). (Scott)
4242
- Fixed bug #46285 (lastInsertId() returns "0" when a deferenced PDOStatement is
4343
executed). (Johannes)
44+
- Fixed bug #46241 (stacked error handlers, error handling in genera).
45+
(Etienne)
4446
- Fixed bug #46238 (Segmentation fault on static call with empty string method).
4547
(Felipe)
4648
- Fixed bug #46205 (Closure - Memory leaks when ReflectionException is thrown).

Zend/tests/bug46196.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Test restore_error_handler() function : bug #46196
33
--CREDITS--
44
Olivier Doucet
5-
--XFAIL--
6-
This test will fail until bug #46196 is fixed
75
--FILE--
86
<?php
97
/* Prototype : void restore_error_handler(void)

Zend/tests/bug46241.phpt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--TEST--
2+
Bug #46241 (error handler stacks)
3+
--FILE--
4+
<?php
5+
6+
class ErrorHandling
7+
{
8+
9+
public function errorHandler1( $errno, $errstr )
10+
{
11+
echo "Caught on first level: '$errstr'\n";
12+
return true;
13+
}
14+
15+
public function errorHandler2( $errno, $errstr )
16+
{
17+
echo "Caught on second level: '$errstr'\n";
18+
return true;
19+
}
20+
}
21+
22+
$err = new ErrorHandling();
23+
24+
set_error_handler( array( $err, 'errorHandler1' ) );
25+
set_error_handler( array( $err, 'errorHandler2' ) );
26+
27+
trigger_error( 'Foo', E_USER_WARNING );
28+
29+
function errorHandler1( $errno, $errstr )
30+
{
31+
echo "Caught on first level: '$errstr'\n";
32+
return true;
33+
}
34+
35+
function errorHandler2( $errno, $errstr )
36+
{
37+
echo "Caught on second level: '$errstr'\n";
38+
return true;
39+
}
40+
41+
set_error_handler( 'errorHandler1' );
42+
set_error_handler( 'errorHandler2' );
43+
44+
trigger_error( 'Foo', E_USER_WARNING );
45+
?>
46+
==END==
47+
--EXPECT--
48+
Caught on second level: 'Foo'
49+
Caught on second level: 'Foo'
50+
==END==

Zend/zend_execute_API.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -943,14 +943,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
943943
EG(opline_ptr) = original_opline_ptr;
944944
} else if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
945945
int call_via_handler = (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
946-
zend_error_handling error_handling;
947-
zend_save_error_handling(&error_handling TSRMLS_CC);
948946
ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
949947
if (EX(function_state).function->common.scope) {
950948
EG(scope) = EX(function_state).function->common.scope;
951949
}
952950
((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC);
953-
zend_restore_error_handling(&error_handling TSRMLS_CC);
954951
/* We shouldn't fix bad extensions here,
955952
because it can break proper ones (Bug #34045)
956953
if (!EX(function_state).function->common.return_reference)
@@ -971,10 +968,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
971968

972969
/* Not sure what should be done here if it's a static method */
973970
if (fci->object_pp) {
974-
zend_error_handling error_handling;
975-
zend_save_error_handling(&error_handling TSRMLS_CC);
976971
Z_OBJ_HT_PP(fci->object_pp)->call_method(EX(function_state).function->common.function_name, fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, *fci->object_pp, 1 TSRMLS_CC);
977-
zend_restore_error_handling(&error_handling TSRMLS_CC);
978972
} else {
979973
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
980974
}

Zend/zend_vm_def.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,6 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
22702270
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
22712271

22722272
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
2273-
zend_error_handling error_handling;
22742273
ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
22752274
EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
22762275
EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
@@ -2285,14 +2284,12 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
22852284
arg_count--;
22862285
}
22872286
}
2288-
zend_save_error_handling(&error_handling TSRMLS_CC);
22892287
if (!zend_execute_internal) {
22902288
/* saves one function call if zend_execute_internal is not used */
22912289
((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
22922290
} else {
22932291
zend_execute_internal(EXECUTE_DATA, RETURN_VALUE_USED(opline) TSRMLS_CC);
22942292
}
2295-
zend_restore_error_handling(&error_handling TSRMLS_CC);
22962293

22972294
if (!RETURN_VALUE_USED(opline)) {
22982295
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
@@ -2340,10 +2337,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
23402337

23412338
/* Not sure what should be done here if it's a static method */
23422339
if (EX(object)) {
2343-
zend_error_handling error_handling;
2344-
zend_save_error_handling(&error_handling TSRMLS_CC);
23452340
Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
2346-
zend_restore_error_handling(&error_handling TSRMLS_CC);
23472341
} else {
23482342
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
23492343
}

Zend/zend_vm_execute.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
294294
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
295295

296296
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
297-
zend_error_handling error_handling;
298297
ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
299298
EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
300299
EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
@@ -309,14 +308,12 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
309308
arg_count--;
310309
}
311310
}
312-
zend_save_error_handling(&error_handling TSRMLS_CC);
313311
if (!zend_execute_internal) {
314312
/* saves one function call if zend_execute_internal is not used */
315313
((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
316314
} else {
317315
zend_execute_internal(execute_data, RETURN_VALUE_USED(opline) TSRMLS_CC);
318316
}
319-
zend_restore_error_handling(&error_handling TSRMLS_CC);
320317

321318
if (!RETURN_VALUE_USED(opline)) {
322319
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
@@ -364,10 +361,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
364361

365362
/* Not sure what should be done here if it's a static method */
366363
if (EX(object)) {
367-
zend_error_handling error_handling;
368-
zend_save_error_handling(&error_handling TSRMLS_CC);
369364
Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
370-
zend_restore_error_handling(&error_handling TSRMLS_CC);
371365
} else {
372366
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
373367
}

ext/date/php_date.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,12 +2420,13 @@ PHP_METHOD(DateTime, __construct)
24202420
zval *timezone_object = NULL;
24212421
char *time_str = NULL;
24222422
int time_str_len = 0;
2423-
2423+
zend_error_handling error_handling;
24242424

2425-
zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC);
2425+
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
24262426
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
24272427
date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
24282428
}
2429+
zend_restore_error_handling(&error_handling TSRMLS_CC);
24292430
}
24302431
/* }}} */
24312432

@@ -3094,8 +3095,9 @@ PHP_METHOD(DateTimeZone, __construct)
30943095
int tz_len;
30953096
timelib_tzinfo *tzi = NULL;
30963097
php_timezone_obj *tzobj;
3098+
zend_error_handling error_handling;
30973099

3098-
zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC);
3100+
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
30993101
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) {
31003102
if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) {
31013103
tzobj = zend_object_store_get_object(getThis() TSRMLS_CC);
@@ -3106,6 +3108,7 @@ PHP_METHOD(DateTimeZone, __construct)
31063108
ZVAL_NULL(getThis());
31073109
}
31083110
}
3111+
zend_restore_error_handling(&error_handling TSRMLS_CC);
31093112
}
31103113
/* }}} */
31113114

@@ -3437,8 +3440,9 @@ PHP_METHOD(DateInterval, __construct)
34373440
int interval_string_length;
34383441
php_interval_obj *diobj;
34393442
timelib_rel_time *reltime;
3443+
zend_error_handling error_handling;
34403444

3441-
zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC);
3445+
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
34423446
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &interval_string, &interval_string_length) == SUCCESS) {
34433447
if (date_interval_initialize(&reltime, interval_string, interval_string_length TSRMLS_CC) == SUCCESS) {
34443448
diobj = zend_object_store_get_object(getThis() TSRMLS_CC);
@@ -3448,6 +3452,7 @@ PHP_METHOD(DateInterval, __construct)
34483452
ZVAL_NULL(getThis());
34493453
}
34503454
}
3455+
zend_restore_error_handling(&error_handling TSRMLS_CC);
34513456
}
34523457
/* }}} */
34533458

@@ -3590,12 +3595,14 @@ PHP_METHOD(DatePeriod, __construct)
35903595
char *isostr = NULL;
35913596
int isostr_len = 0;
35923597
timelib_time *clone;
3598+
zend_error_handling error_handling;
35933599

3594-
zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC);
3600+
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
35953601
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) {
35963602
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_date, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) {
35973603
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &isostr, &isostr_len, &options) == FAILURE) {
35983604
php_error_docref(NULL TSRMLS_CC, E_WARNING, "This constructor accepts either (DateTime, DateInterval, int) OR (DateTime, DateInterval, DateTime) OR (string) as arguments.");
3605+
zend_restore_error_handling(&error_handling TSRMLS_CC);
35993606
return;
36003607
}
36013608
}
@@ -3662,6 +3669,8 @@ PHP_METHOD(DatePeriod, __construct)
36623669
dpobj->recurrences = recurrences + dpobj->include_start_date;
36633670

36643671
dpobj->initialized = 1;
3672+
3673+
zend_restore_error_handling(&error_handling TSRMLS_CC);
36653674
}
36663675
/* }}} */
36673676

ext/dom/attr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ PHP_METHOD(domattr, __construct)
6666

6767
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6868
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_attr_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
69+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6970
return;
7071
}
7172

ext/dom/cdatasection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ PHP_METHOD(domcdatasection, __construct)
5959

6060
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6161
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_cdatasection_class_entry, &value, &value_len) == FAILURE) {
62+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6263
return;
6364
}
6465

ext/dom/comment.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ PHP_METHOD(domcomment, __construct)
5959

6060
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6161
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_comment_class_entry, &value, &value_len) == FAILURE) {
62+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6263
return;
6364
}
6465

ext/dom/document.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ PHP_METHOD(domdocument, __construct)
14411441

14421442
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
14431443
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) {
1444+
zend_restore_error_handling(&error_handling TSRMLS_CC);
14441445
return;
14451446
}
14461447

ext/dom/documentfragment.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ PHP_METHOD(domdocumentfragment, __construct)
6060

6161
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6262
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) {
63+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6364
return;
6465
}
6566

ext/dom/element.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ PHP_METHOD(domelement, __construct)
166166

167167
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
168168
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) {
169+
zend_restore_error_handling(&error_handling TSRMLS_CC);
169170
return;
170171
}
171172
zend_restore_error_handling(&error_handling TSRMLS_CC);

ext/dom/entityreference.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ PHP_METHOD(domentityreference, __construct)
5858

5959
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6060
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) {
61+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6162
return;
6263
}
6364

ext/dom/processinginstruction.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ PHP_METHOD(domprocessinginstruction, __construct)
6060

6161
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
6262
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) {
63+
zend_restore_error_handling(&error_handling TSRMLS_CC);
6364
return;
6465
}
6566

ext/dom/text.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ PHP_METHOD(domtext, __construct)
7474

7575
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
7676
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) {
77+
zend_restore_error_handling(&error_handling TSRMLS_CC);
7778
return;
7879
}
7980

ext/dom/xpath.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ PHP_METHOD(domxpath, __construct)
277277

278278
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC);
279279
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) {
280+
zend_restore_error_handling(&error_handling TSRMLS_CC);
280281
return;
281282
}
282283

ext/mysqli/mysqli_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int driver_report_write(mysqli_object *obj, zval *value TSRMLS_DC)
7979
{
8080
MyG(report_mode) = Z_LVAL_P(value);
8181
/*FIXME*/
82-
zend_replace_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, NULL, NULL TSRMLS_CC);
82+
/* zend_replace_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, NULL, NULL TSRMLS_CC); */
8383
return SUCCESS;
8484
}
8585
/* }}} */

ext/simplexml/simplexml.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,7 @@ SXE_METHOD(__construct)
21822182

21832183
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
21842184
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lbsb", &data, &data_len, &options, &is_url, &ns, &ns_len, &isprefix) == FAILURE) {
2185+
zend_restore_error_handling(&error_handling TSRMLS_CC);
21852186
return;
21862187
}
21872188

ext/spl/spl_array.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,16 +1010,18 @@ SPL_METHOD(Array, __construct)
10101010
zval **array;
10111011
long ar_flags = 0;
10121012
zend_class_entry *ce_get_iterator = spl_ce_Iterator;
1013+
zend_error_handling error_handling;
10131014

10141015
if (ZEND_NUM_ARGS() == 0) {
10151016
return; /* nothing to do */
10161017
}
10171018

1018-
zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC);
1019+
zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, &error_handling TSRMLS_CC);
10191020

10201021
intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
10211022

10221023
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|lC", &array, &ar_flags, &ce_get_iterator) == FAILURE) {
1024+
zend_restore_error_handling(&error_handling TSRMLS_CC);
10231025
return;
10241026
}
10251027

@@ -1031,6 +1033,8 @@ SPL_METHOD(Array, __construct)
10311033

10321034
spl_array_set_array(object, intern, array, ar_flags, ZEND_NUM_ARGS() == 1 TSRMLS_CC);
10331035

1036+
zend_restore_error_handling(&error_handling TSRMLS_CC);
1037+
10341038
}
10351039
/* }}} */
10361040

0 commit comments

Comments
 (0)