summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/php_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 3854c54880..69fe2c24f6 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -331,7 +331,7 @@ static inline int add_post_vars(zval *arr, post_var_data_t *vars, zend_bool eof)
}
}
- if (!eof) {
+ if (!eof && ZSTR_VAL(vars->str.s) != vars->ptr) {
memmove(ZSTR_VAL(vars->str.s), vars->ptr, ZSTR_LEN(vars->str.s) = vars->end - vars->ptr);
}
return SUCCESS;