X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiExpandTemplates.php;h=4b74a3d4d9106734e2c083f8c51622fa48948ed1;hp=1c7f63d000d2c3bf671aee84d38eb1366ed0f548;hb=64e7e7d760fc3e043f7e01a89cc3697869aaa93b;hpb=75e2607211b30103417d73a780498b9d27537b62 diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 1c7f63d000..4b74a3d4d9 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -76,10 +76,6 @@ class ApiExpandTemplates extends ApiBase { $this->addWarning( [ 'apierror-revwrongpage', $rev->getId(), wfEscapeWikiText( $pTitleObj->getPrefixedText() ) ] ); } - } else { - // Consider the title derived from the revid as having - // been provided. - $titleProvided = true; } } @@ -103,6 +99,7 @@ class ApiExpandTemplates extends ApiBase { if ( isset( $prop['parsetree'] ) || $params['generatexml'] ) { $parser->startExternalParse( $titleObj, $options, Parser::OT_PREPROCESS ); $dom = $parser->preprocessToDom( $params['text'] ); + // @phan-suppress-next-line PhanUndeclaredMethodInCallable if ( is_callable( [ $dom, 'saveXML' ] ) ) { // @phan-suppress-next-line PhanUndeclaredMethod $xml = $dom->saveXML();