mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
No need to copy the zval unless __clone() is called
This commit is contained in:
parent
3079bb1bda
commit
851bd22f82
@ -2422,7 +2422,7 @@ int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
|
||||
|
||||
/* We are not handling overloaded classes right now */
|
||||
EX(object) = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
|
||||
if (!PZVAL_IS_REF(EX(object))) {
|
||||
if (!PZVAL_IS_REF(EX(object)) || !EG(implicit_clone)) {
|
||||
EX(object)->refcount++; /* For $this pointer */
|
||||
} else {
|
||||
zval *this_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user