Merge "Provide command to adjust phpunit.xml for code coverage"
[lhc/web/wiklou.git] / includes / api / ApiExpandTemplates.php
index 1c7f63d..4b74a3d 100644 (file)
@@ -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();