Skip to content

Commit 17ba8a6

Browse files
committed
...
1 parent 12e3e16 commit 17ba8a6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Zend/zend_partial.c

+11-10
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ void zend_partial_startup(void) {
426426
ZEND_NAMED_FUNCTION(zend_partial_call_magic)
427427
{
428428
zend_partial *partial = (zend_partial*) Z_OBJ_P(ZEND_THIS);
429+
zend_object *object = NULL;
429430
zval *params;
430431
uint32_t num_params;
431432
HashTable *named_args;
@@ -443,9 +444,9 @@ ZEND_NAMED_FUNCTION(zend_partial_call_magic)
443444
fcc.function_handler = &partial->func;
444445

445446
if (Z_TYPE(partial->This) == IS_OBJECT) {
446-
fci.object =
447-
fcc.object =
448-
zend_partial_this(Z_OBJ(partial->This));
447+
object = fci.object =
448+
fcc.object =
449+
zend_partial_this(Z_OBJ(partial->This));
449450
} else if (Z_TYPE(partial->This) == IS_PTR) {
450451
zend_class_entry *type = Z_PTR(partial->This);
451452
zval instance;
@@ -456,10 +457,10 @@ ZEND_NAMED_FUNCTION(zend_partial_call_magic)
456457
ZVAL_OBJ(&instance, zend_objects_new(type));
457458
}
458459

459-
fci.object =
460-
fcc.object =
461-
Z_OBJ(instance);
462-
GC_ADD_FLAGS(fci.object, IS_OBJ_DESTRUCTOR_CALLED);
460+
object = fci.object =
461+
fcc.object =
462+
Z_OBJ(instance);
463+
GC_ADD_FLAGS(object, IS_OBJ_DESTRUCTOR_CALLED);
463464
}
464465

465466
memcpy(fci.params, partial->argv, partial->argc * sizeof(zval));
@@ -505,7 +506,7 @@ ZEND_NAMED_FUNCTION(zend_partial_call_magic)
505506

506507
if (!EG(exception)) {
507508
if (partial->func.common.fn_flags & ZEND_ACC_CTOR) {
508-
GC_DEL_FLAGS(fcc.object, IS_OBJ_DESTRUCTOR_CALLED);
509+
GC_DEL_FLAGS(object, IS_OBJ_DESTRUCTOR_CALLED);
509510
}
510511
}
511512

@@ -515,8 +516,8 @@ ZEND_NAMED_FUNCTION(zend_partial_call_magic)
515516

516517
if (partial->func.common.fn_flags & ZEND_ACC_CTOR) {
517518
zval_ptr_dtor(return_value);
518-
519-
RETVAL_OBJ(fci.object);
519+
520+
RETVAL_OBJ(object);
520521
}
521522

522523
if (!fcc.function_handler) {

0 commit comments

Comments
 (0)