]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorDmitry Stogov <dmitry@zend.com>
Mon, 1 Jun 2015 09:21:48 +0000 (12:21 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 1 Jun 2015 09:21:48 +0000 (12:21 +0300)
* PHP-5.6:
  Fixed bug #69732 (can induce segmentation fault with basic php code).

1  2 
Zend/tests/bug69732.phpt

index 0000000000000000000000000000000000000000,2ea5e58bc973f3b4f6358b9e21ed58bd919c08bf..bc6206d1136cfbb0a1d6ddb43191f55eece94f22
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,30 +1,30 @@@
 -Strict Standards: Only variables should be assigned by reference in %sbug69732.php on line 16
+ --TEST--
+ Bug #69732 (can induce segmentation fault with basic php code)
+ --FILE--
+ <?php
+ class wpq {
+     private $unreferenced;
+  
+     public function __get($name) {
+         return $this->$name . "XXX";
+     }
+ }
+  
+ function ret_assoc() {
+       $x = "XXX";
+     return array('foo' => 'bar', $x);
+ }
+  
+ $wpq = new wpq;
+ $wpq->interesting =& ret_assoc();
+ $x = $wpq->interesting;
+ printf("%s\n", $x);
+ --EXPECTF--
+ Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
+ Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16
++Notice: Only variables should be assigned by reference in %sbug69732.php on line 16
+ Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
+ XXX