if ( $arg instanceof PPNode ) {
$arg = $arg->node;
}
- if ( !$xpath ) {
+ if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
$xpath = new DOMXPath( $arg->ownerDocument );
}
/**
* @param string $sep
* @param int $flags
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return string
*/
public function implodeWithFlags( $sep, $flags /*, ... */ ) {
* This previously called implodeWithFlags but has now been inlined to reduce stack depth
*
* @param string $sep
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return string
*/
public function implode( $sep /*, ... */ ) {
* with implode()
*
* @param string $sep
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return array
*/
public function virtualImplode( $sep /*, ... */ ) {
* @param string $start
* @param string $sep
* @param string $end
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return array
*/
public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {