]> granicus.if.org Git - php/commitdiff
Fixed bug #34712 (zend.ze1_compatibility_mode = on segfault)
authorDmitry Stogov <dmitry@php.net>
Thu, 20 Oct 2005 08:55:10 +0000 (08:55 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 20 Oct 2005 08:55:10 +0000 (08:55 +0000)
NEWS
Zend/tests/bug34712.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index 3a54ef5ce443ade3f0a135b6de8b4a21d6688fd6..93d00d02c34817d0f7b35c5d620c62cfa033e208 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ PHP                                                                        NEWS
 - Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
 - Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects correctly).
   (Dmitry)
+- Fixed bug #34712 (zend.ze1_compatibility_mode = on segfault). (Dmitry)
 - Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
   files). (Derick)
 - Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
diff --git a/Zend/tests/bug34712.phpt b/Zend/tests/bug34712.phpt
new file mode 100755 (executable)
index 0000000..db7860c
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Bug #34712 zend.ze1_compatibility_mode = on segfault 
+--INI--
+zend.ze1_compatibility_mode=1
+error_reporting=4095
+--FILE--
+<?php
+class foo {
+       function foo(&$obj_ref) {
+               $this->bar = &$obj_ref;
+       }
+}              
+
+
+class bar {
+       function bar() {
+               $this->foo = new foo($this);
+       }
+}
+
+$test = new bar;
+echo "ok\n";
+?>
+--EXPECTF--
+Strict Standards: Implicit cloning object of class 'foo' because of 'zend.ze1_compatibility_mode' in %sbug34712.php on line 11
+
+Strict Standards: Implicit cloning object of class 'bar' because of 'zend.ze1_compatibility_mode' in %sbug34712.php on line 15
+ok