From: Xinchen Hui Date: Mon, 3 Mar 2014 15:14:57 +0000 (+0800) Subject: Paramter are references X-Git-Tag: POST_PHPNG_MERGE~412^2~434^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3de898d98d33d7a65df380ed128a09a1d85a3fe;p=php Paramter are references --- 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); }