summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 656316cc4e..08fc18f261 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1871,6 +1871,9 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
}
} else if (UNEXPECTED(Z_STRLEN_P(op2) == 0)) {
if (EXPECTED(result != op1)) {
+ if (result == orig_op1) {
+ i_zval_ptr_dtor(result);
+ }
ZVAL_COPY(result, op1);
}
} else {