summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-05-17 13:46:54 +0200
committerNikita Popov <nikic@php.net>2015-05-17 13:46:54 +0200
commit0df2f470fa194b28f1eb9e5788b8cf4c3f03f5f7 (patch)
tree1a56bc4275da977b8169a0062bcbec9bde2cfa06 /Zend/tests
parent2660fb96aac78658f4f7c1ac4101c3f464536ca9 (diff)
downloadphp-git-0df2f470fa194b28f1eb9e5788b8cf4c3f03f5f7.tar.gz
Don't write prop if read prop threw exception
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/closure_038.phpt5
-rw-r--r--Zend/tests/closure_039.phpt5
-rw-r--r--Zend/tests/exception_during_property_assign_op.phpt21
3 files changed, 21 insertions, 10 deletions
diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt
index b1e9406872..61fcc1cb94 100644
--- a/Zend/tests/closure_038.phpt
+++ b/Zend/tests/closure_038.phpt
@@ -64,9 +64,4 @@ Next exception 'EngineException' with message 'Cannot access private property B:
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
-
-Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
-Stack trace:
-#0 %s(%d): Closure->{closure}()
-#1 {main}
thrown in %s on line %d
diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt
index 9e5ecbd21b..ecdf9be080 100644
--- a/Zend/tests/closure_039.phpt
+++ b/Zend/tests/closure_039.phpt
@@ -64,9 +64,4 @@ Next exception 'EngineException' with message 'Cannot access private property B:
Stack trace:
#0 %s(%d): Closure->{closure}()
#1 {main}
-
-Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
-Stack trace:
-#0 %s(%d): Closure->{closure}()
-#1 {main}
thrown in %s on line %d
diff --git a/Zend/tests/exception_during_property_assign_op.phpt b/Zend/tests/exception_during_property_assign_op.phpt
new file mode 100644
index 0000000000..0c4c5d098d
--- /dev/null
+++ b/Zend/tests/exception_during_property_assign_op.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Exception during read part of compound assignment operation on a property
+--FILE--
+<?php
+
+class Test {
+ public function __get($name) {
+ throw new Exception;
+ }
+}
+
+$test = new Test;
+try {
+ $test->prop += 42;
+} catch (Exception $e) {}
+var_dump($test);
+
+?>
+--EXPECT--
+object(Test)#1 (0) {
+}