summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xZend/tests/bug34712.phpt28
2 files changed, 29 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3a54ef5ce4..93d00d02c3 100644
--- 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
index 0000000000..db7860cd38
--- /dev/null
+++ b/Zend/tests/bug34712.phpt
@@ -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