summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
authorChristoph M. Becker <cmb@php.net>2016-07-15 01:09:58 +0200
committerChristoph M. Becker <cmb@php.net>2016-07-15 01:14:41 +0200
commitb01b093ca9a46462414323c6abedb4373a58796d (patch)
treeb9ec2d6ba2d5507a09678c0f080385ee6926220e /ext/dom
parent0b0e7520a9647193e3cae7d64efa6e0c3b0c512d (diff)
parenta4aa4f9772a6c30f69db8560cde1f5fe4545b174 (diff)
downloadphp-git-b01b093ca9a46462414323c6abedb4373a58796d.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/tests/bug66502.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/dom/tests/bug66502.phpt b/ext/dom/tests/bug66502.phpt
new file mode 100644
index 0000000000..5b35b41e93
--- /dev/null
+++ b/ext/dom/tests/bug66502.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #66502 (DOM document dangling reference)
+--SKIPIF--
+<?php
+if (!extension_loaded('dom')) die('skip requires ext/dom');
+?>
+--FILE--
+<?php
+$dom = new DOMDocument('1.0', 'UTF-8');
+$element = $dom->appendChild(new DOMElement('root'));
+$comment = new DOMComment("Comment 0");
+$comment = $element->appendChild($comment);
+
+$comment->__construct("Comment 1");
+$comment->__construct("Comment 2");
+$comment->__construct("Comment 3");
+echo 'DONE', PHP_EOL;
+?>
+--EXPECT--
+DONE \ No newline at end of file