com php-src: Paramter are references: ext/standard/exec.c
| From: | Dmitry Stogov | Date: | Mon, 03 Mar 2014 15:14:57 +0000 |
| Subject: | com php-src: Paramter are references: ext/standard/exec.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77795@lists.php.net to get a copy of this message | ||
Commit: e3de898d98d33d7a65df380ed128a09a1d85a3fe
Author: Xinchen Hui <laruence@gmail.com> Mon, 3 Mar 2014 23:14:57 +0800
Parents: d821c9014887ae8fa5ad032ec3c04df7efafa55b
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3de898d98d33d7a65df380ed128a09a1d85a3fe
Log:
Paramter are references
Changed paths:
M ext/standard/exec.c
Diff:
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index fb33812..bc1f067 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);
}