summaryrefslogtreecommitdiff
path: root/Zend/tests/bug75420.phpt
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-10-26 10:07:08 +0800
committerXinchen Hui <laruence@gmail.com>2017-10-26 10:07:08 +0800
commitd2047503cbc080ef96b00ac254604aaa01cf618e (patch)
treecd87186649ca60582fc48e7da30f7153d75fed52 /Zend/tests/bug75420.phpt
parent578ba71b3b0a636554675be6a8f441615e74b80c (diff)
downloadphp-git-d2047503cbc080ef96b00ac254604aaa01cf618e.tar.gz
Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
Diffstat (limited to 'Zend/tests/bug75420.phpt')
-rw-r--r--Zend/tests/bug75420.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/bug75420.phpt b/Zend/tests/bug75420.phpt
new file mode 100644
index 0000000000..890fbe5ad5
--- /dev/null
+++ b/Zend/tests/bug75420.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
+--FILE--
+<?php
+
+class Test {
+ public function __isset($x) { $GLOBALS["name"] = 24; return true; }
+public function __get($x) { var_dump($x); return 42; }
+}
+
+$obj = new Test;
+$name = "foo";
+var_dump($obj->$name ?? 12);
+?>
+--EXPECT--