diff options
| author | Xinchen Hui <laruence@gmail.com> | 2018-06-27 13:05:11 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2018-06-27 13:05:11 +0800 |
| commit | d1b1866a3a035b946e50b17eeefd19add81c7eab (patch) | |
| tree | 7ead754956797c40fb68a7f3b26d3872532b1fb7 /Zend/tests | |
| parent | 6b5597f7d8e31933dfb833dd443290adc02ca307 (diff) | |
| download | php-git-d1b1866a3a035b946e50b17eeefd19add81c7eab.tar.gz | |
Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)
Diffstat (limited to 'Zend/tests')
| -rw-r--r-- | Zend/tests/bug76534.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/bug76534.phpt b/Zend/tests/bug76534.phpt new file mode 100644 index 0000000000..956a29ba2c --- /dev/null +++ b/Zend/tests/bug76534.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler) +--FILE-- +<?php +set_error_handler(function ($severity, $message, $file, $line) { + throw new \Exception($message); +}); + +$x = "foo"; +$y = &$x["bar"]; +?> +--EXPECTF-- +Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d +Stack trace: +#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d, Array) +#1 {main} + thrown in %sbug76534.php on line %d |
