From 6a7b192a0a38ac578f93e269b636d60538155d5e Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 26 Aug 2014 11:20:00 -0400 Subject: [PATCH] Handle multiple ownerDocuments for args in Preprocessor_DOM As long as Preprocessor_DOM::newPartNodeArray returns nodes with different roots when called multiple times, PPFrame_DOM::newChild should be prepared to receive such. Bug: 70046 Change-Id: Ie048d8dbd3042f19d934ff0dd8d32b4c46f9f952 --- includes/parser/Preprocessor_DOM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 8416ac3c7b..2edb79a2af 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -1033,7 +1033,7 @@ class PPFrame_DOM implements PPFrame { if ( $arg instanceof PPNode ) { $arg = $arg->node; } - if ( !$xpath ) { + if ( !$xpath || $xpath->document !== $arg->ownerDocument ) { $xpath = new DOMXPath( $arg->ownerDocument ); } -- 2.20.1