File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #80811: Function exec without $output but with $restult_code parameter crashes
3
+ --FILE--
4
+ <?php
5
+
6
+ echo 'Executing with all params: ' . PHP_EOL ;
7
+ exec ('echo Something ' , output: $ output , result_code: $ resultCode );
8
+ var_dump ($ resultCode );
9
+
10
+ echo 'Executing without output param: ' . PHP_EOL ;
11
+ exec ('echo Something ' , result_code: $ resultCode );
12
+ var_dump ($ resultCode );
13
+
14
+ ?>
15
+ --EXPECT--
16
+ Executing with all params:
17
+ int(0)
18
+ Executing without output param:
19
+ int(0)
Original file line number Diff line number Diff line change @@ -4595,6 +4595,9 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
4595
4595
}
4596
4596
4597
4597
ZVAL_COPY_VALUE (arg , & default_value );
4598
+ if (ZEND_ARG_SEND_MODE (arg_info ) & ZEND_SEND_BY_REF ) {
4599
+ ZVAL_NEW_REF (arg , arg );
4600
+ }
4598
4601
}
4599
4602
}
4600
4603
You can’t perform that action at this time.
0 commit comments