@@ -20408,11 +20408,14 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
20408
20408
if ((IS_VAR == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
20409
20409
(IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
20410
20410
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
20411
- }
20412
- zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
20413
-
20414
- if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
20415
- Z_DELREF_PP(variable_ptr_ptr);
20411
+ } else if ((IS_VAR == IS_VAR && UNEXPECTED(*value_ptr_ptr == &EG(error_zval))) ||
20412
+ (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval)))) {
20413
+ variable_ptr_ptr = &EG(uninitialized_zval_ptr);
20414
+ } else {
20415
+ zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
20416
+ if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
20417
+ Z_DELREF_PP(variable_ptr_ptr);
20418
+ }
20416
20419
}
20417
20420
20418
20421
if (RETURN_VALUE_USED(opline)) {
@@ -23903,11 +23906,14 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
23903
23906
if ((IS_CV == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
23904
23907
(IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
23905
23908
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
23906
- }
23907
- zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
23908
-
23909
- if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
23910
- Z_DELREF_PP(variable_ptr_ptr);
23909
+ } else if ((IS_CV == IS_VAR && UNEXPECTED(*value_ptr_ptr == &EG(error_zval))) ||
23910
+ (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval)))) {
23911
+ variable_ptr_ptr = &EG(uninitialized_zval_ptr);
23912
+ } else {
23913
+ zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
23914
+ if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
23915
+ Z_DELREF_PP(variable_ptr_ptr);
23916
+ }
23911
23917
}
23912
23918
23913
23919
if (RETURN_VALUE_USED(opline)) {
@@ -37721,11 +37727,14 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
37721
37727
if ((IS_VAR == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
37722
37728
(IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
37723
37729
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
37724
- }
37725
- zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
37726
-
37727
- if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
37728
- Z_DELREF_PP(variable_ptr_ptr);
37730
+ } else if ((IS_VAR == IS_VAR && UNEXPECTED(*value_ptr_ptr == &EG(error_zval))) ||
37731
+ (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval)))) {
37732
+ variable_ptr_ptr = &EG(uninitialized_zval_ptr);
37733
+ } else {
37734
+ zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
37735
+ if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
37736
+ Z_DELREF_PP(variable_ptr_ptr);
37737
+ }
37729
37738
}
37730
37739
37731
37740
if (RETURN_VALUE_USED(opline)) {
@@ -40929,11 +40938,14 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
40929
40938
if ((IS_CV == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
40930
40939
(IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
40931
40940
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
40932
- }
40933
- zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
40934
-
40935
- if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
40936
- Z_DELREF_PP(variable_ptr_ptr);
40941
+ } else if ((IS_CV == IS_VAR && UNEXPECTED(*value_ptr_ptr == &EG(error_zval))) ||
40942
+ (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval)))) {
40943
+ variable_ptr_ptr = &EG(uninitialized_zval_ptr);
40944
+ } else {
40945
+ zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
40946
+ if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
40947
+ Z_DELREF_PP(variable_ptr_ptr);
40948
+ }
40937
40949
}
40938
40950
40939
40951
if (RETURN_VALUE_USED(opline)) {
0 commit comments