diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-30 17:23:18 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-30 17:23:18 +0100 |
| commit | 904c1b6589b999a8e387215ac3c8fce9e4ab62a8 (patch) | |
| tree | 5587fe716cac3a53a352535120978ab1c4018c8c /ext/reflection | |
| parent | 5958137dc512ca4c6c82576b6f045559e39791e1 (diff) | |
| download | php-git-904c1b6589b999a8e387215ac3c8fce9e4ab62a8.tar.gz | |
FIxed bug #80299
The must_wrap was leaking across iterations.
Diffstat (limited to 'ext/reflection')
| -rw-r--r-- | ext/reflection/tests/bug80299.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug80299.phpt b/ext/reflection/tests/bug80299.phpt new file mode 100644 index 0000000000..61aec5b1ce --- /dev/null +++ b/ext/reflection/tests/bug80299.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #80299: ReflectionFunction->invokeArgs confused in arguments +--FILE-- +<?php + +$bar = new DateTime(); +$args = [1, &$bar]; + +$function = function (int &$foo, DateTimeInterface &$bar) {}; + +(new ReflectionFunction($function))->invokeArgs($args); + +?> +--EXPECTF-- +Warning: {closure}(): Argument #1 ($foo) must be passed by reference, value given in %s on line %d |
