From e3de898d98d33d7a65df380ed128a09a1d85a3fe Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 3 Mar 2014 23:14:57 +0800 Subject: [PATCH] Paramter are references --- ext/standard/exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/standard/exec.c b/ext/standard/exec.c index fb33812c19..bc1f067290 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -192,6 +192,7 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ if (!ret_array) { ret = php_exec(mode, cmd, NULL, return_value TSRMLS_CC); } else { + ret_array = Z_REFVAL_P(ret_array); if (Z_TYPE_P(ret_array) != IS_ARRAY) { zval_dtor(ret_array); array_init(ret_array); @@ -199,6 +200,7 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ ret = php_exec(2, cmd, ret_array, return_value TSRMLS_CC); } if (ret_code) { + ret_code = Z_REFVAL_P(ret_code); zval_dtor(ret_code); ZVAL_LONG(ret_code, ret); } -- 2.50.1