diff options
| author | Nikita Popov <nikic@php.net> | 2016-05-02 19:58:56 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-05-02 19:59:43 +0200 |
| commit | ec7c3c22b69814aa0b64c6b9aa9fef17f99103ab (patch) | |
| tree | 4e6dd92f1565b91c9e8b7b5721e817d66191fafc /Zend/tests | |
| parent | 45c0301b693e1c26c663e8a73a804fb9eb1ba1cf (diff) | |
| download | php-git-ec7c3c22b69814aa0b64c6b9aa9fef17f99103ab.tar.gz | |
Fix leak in zend_get_constant_ex
Diffstat (limited to 'Zend/tests')
| -rw-r--r-- | Zend/tests/invalid_parent_const_ref_leak.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/invalid_parent_const_ref_leak.phpt b/Zend/tests/invalid_parent_const_ref_leak.phpt new file mode 100644 index 0000000000..33e2548f31 --- /dev/null +++ b/Zend/tests/invalid_parent_const_ref_leak.phpt @@ -0,0 +1,18 @@ +--TEST-- +Leak when using an invalid parent:: reference in a constant definition +--FILE-- +<?php + +class A { + const B = parent::C; +} + +try { + A::B; +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +Cannot access parent:: when current class scope has no parent |
