diff options
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 |
