We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 897bf91 commit 3e3d029Copy full SHA for 3e3d029
Zend/tests/bug70083.phpt
@@ -0,0 +1,26 @@
1
+--TEST--
2
+Bug #70083 (Use after free with assign by ref to overloaded objects)
3
+--FILE--
4
+<?php
5
+
6
+class foo {
7
+ private $var;
8
+ function __get($e) {
9
+ return $this;
10
+ }
11
+}
12
13
+function &noref() { $foo = 1; return $foo; }
14
15
+$foo = new foo;
16
+$foo->i = &noref();
17
+var_dump($foo);
18
19
+?>
20
+--EXPECTF--
21
22
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
23
+Stack trace:
24
+#0 {main}
25
+ thrown in %s on line %d
26
0 commit comments