diff options
author | Nikita Popov <nikic@php.net> | 2014-10-06 20:14:30 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-10-06 20:14:30 +0200 |
commit | 2a0c4edfdaca8339eed8caa1cc1947c68225dbc3 (patch) | |
tree | 89d7df39b63f655c011f0d21c05e487f0548dfe2 /Zend/tests | |
parent | 390900cbcb5c81080f4b58d15209c276075e078c (diff) | |
download | php-git-2a0c4edfdaca8339eed8caa1cc1947c68225dbc3.tar.gz |
Drop convert_to usage in zend_exceptions
To make everything work correctly with refs.
I'm unsure whether the GET_PROPERTY_SILENT distinction is really
necessary, because the choice seemed pretty random, but kept it
around.
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/exception_with_by_ref_message.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/exception_with_by_ref_message.phpt b/Zend/tests/exception_with_by_ref_message.phpt new file mode 100644 index 0000000000..f15c3e2719 --- /dev/null +++ b/Zend/tests/exception_with_by_ref_message.phpt @@ -0,0 +1,21 @@ +--TEST-- +Exception with by-ref message +--FILE-- +<?php + +class MyException extends Exception +{ + public function __construct(&$msg) { + $this->message =& $msg; + } +} + +$msg = 'Message'; +throw new MyException($msg); + +?> +--EXPECTF-- +Fatal error: Uncaught exception 'MyException' with message 'Message' in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d |