Fix reflection default arg evaluation for $this
commit41f28ee66e51d69b3c0fb0bf66a62b49a064382b
authorJoseph Griego <jgriego@fb.com>
Fri, 10 Jul 2020 18:13:47 +0000 (10 11:13 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 10 Jul 2020 18:15:40 +0000 (10 11:15 -0700)
tree613af69f7784a580a7fe4c92b7c8e655ffb29216
parent3496f30b3bbb2e1f39beae4f3cbcbcbe31ed1842
Fix reflection default arg evaluation for $this

Summary:
If the error elevator raised in the default value initializer we would
actually let the exception bubble up to the user of the reflection API since
the exception is an `Object`, not an `Exception`.

Differential Revision: D22472094

fbshipit-source-id: 1a57aebca9f0301ecea34d2ca8ce3073bdac3e08
hphp/runtime/base/runtime-option.h
hphp/runtime/ext/reflection/ext_reflection.cpp
hphp/test/slow/this-default-arg-error-elevator-warn.php.expectf [new file with mode: 0644]
hphp/test/slow/this-default-arg-error-elevator-warn.php.opts [new file with mode: 0644]
hphp/test/slow/this-default-arg-error-elevator.php [new file with mode: 0644]
hphp/test/slow/this-default-arg-error-elevator.php.expectf [new file with mode: 0644]
hphp/test/slow/this-default-arg-error-elevator.php.opts [new file with mode: 0644]