diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-10-26 13:05:23 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-26 13:05:23 +0300 |
commit | bc59289b7a25219ea2179554dc26c88e533250a5 (patch) | |
tree | 7e2e3280bc9920649cd0a4f1e2a8efb54c0d719b /Zend/tests/bug75420.6.phpt | |
parent | eaeccc1d99458f17b535a8fb3ae7479f8d013d7f (diff) | |
download | php-git-bc59289b7a25219ea2179554dc26c88e533250a5.tar.gz |
Fixed indirect modification of magic method arguments.
Diffstat (limited to 'Zend/tests/bug75420.6.phpt')
-rw-r--r-- | Zend/tests/bug75420.6.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/bug75420.6.phpt b/Zend/tests/bug75420.6.phpt new file mode 100644 index 0000000000..e4aa230b48 --- /dev/null +++ b/Zend/tests/bug75420.6.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #75420.6 (Indirect modification of magic method argument) +--FILE-- +<?php +class Test { + public function __isset($x) { $GLOBALS["obj"] = 24; return true; } + public function __get($x) { var_dump($this); return 42; } +} + +$obj = new Test; +$name = "foo"; +var_dump(empty($obj->$name)); +var_dump($obj); +?> +--EXPECT-- +object(Test)#1 (0) { +} +bool(false) +int(24) |