When filling in defaults for skipped params, make sure that
reference parameters get the expected reference wrapper.
- Core:
. Fixed bug #75776 (Flushing streams with compression filter is broken). (cmb)
+ . Fixed bug #80811 (Function exec without $output but with $restult_code
+ parameter crashes). (Nikita)
- IMAP:
. Fixed bug #80800 (imap_open() fails when the flags parameter includes
--- /dev/null
+--TEST--
+Bug #80811: Function exec without $output but with $restult_code parameter crashes
+--FILE--
+<?php
+
+echo 'Executing with all params:' . PHP_EOL;
+exec('echo Something', output: $output, result_code: $resultCode);
+var_dump($resultCode);
+
+echo 'Executing without output param:' . PHP_EOL;
+exec('echo Something', result_code: $resultCode);
+var_dump($resultCode);
+
+?>
+--EXPECT--
+Executing with all params:
+int(0)
+Executing without output param:
+int(0)
}
ZVAL_COPY_VALUE(arg, &default_value);
+ if (ZEND_ARG_SEND_MODE(arg_info) & ZEND_SEND_BY_REF) {
+ ZVAL_NEW_REF(arg, arg);
+ }
}
}