diff options
author | Antony Dovgal <tony2001@php.net> | 2006-08-28 10:27:58 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-08-28 10:27:58 +0000 |
commit | f7ba7232d894c8658a50937733f226a8493e8e0b (patch) | |
tree | dacaaff2129dbe63b091fd7201cc72c32986d98f /Zend/tests/bug38624.phpt | |
parent | 615f2d72959316a2b98e31462d5df0384dad142f (diff) | |
download | php-git-f7ba7232d894c8658a50937733f226a8493e8e0b.tar.gz |
MFH: fix #38624 (Strange warning when incrementing an object property and exception is thrown from __get method)
Diffstat (limited to 'Zend/tests/bug38624.phpt')
-rw-r--r-- | Zend/tests/bug38624.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Zend/tests/bug38624.phpt b/Zend/tests/bug38624.phpt new file mode 100644 index 0000000000..081e35c72a --- /dev/null +++ b/Zend/tests/bug38624.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #38624 (Strange warning when incrementing an object property and exception is thrown from __get method) +--FILE-- +<?php + +class impl +{ + public function __construct() + { + $this->counter++; + } + public function __set( $name, $value ) + { + throw new Exception( "doesn't work" ); + } + + public function __get( $name ) + { + throw new Exception( "doesn't work" ); + } + +} + +$impl = new impl(); + +echo "Done\n"; +?> +--EXPECTF-- +Fatal error: Uncaught exception 'Exception' with message 'doesn't work' in %s:%d +Stack trace: +#0 %s(%d): impl->__get('counter') +#1 %s(%d): impl->__construct() +#2 {main} + thrown in %s on line %d |