diff options
Diffstat (limited to 'ext/standard/string.c')
| -rw-r--r-- | ext/standard/string.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 3be7d77b7b..1c096fbfe5 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -889,9 +889,16 @@ PHP_FUNCTION(implode) } php_implode(delim, arr, return_value); - if (arg1 != NULL && arg1_separated) zval_ptr_dtor(arg1); - if (arg2 != NULL && arg2_separated) zval_ptr_dtor(arg2); - if (delim_needs_dtor) FREE_ZVAL(delim); + + if (arg1 != NULL && arg1_separated) { + zval_ptr_dtor(arg1); + } + if (arg2 != NULL && arg2_separated) { + zval_ptr_dtor(arg2); + } + if (delim_needs_dtor) { + FREE_ZVAL(delim); + } } /* }}} */ |
