From 3ad70ec18229638dce927dd8b6dbbb5ba6f22f85 Mon Sep 17 00:00:00 2001 From: Isabelle Hurbain-Palatin Date: Thu, 21 Nov 2024 14:15:19 +0100 Subject: [PATCH] Replace uses of deprecated ParserOutput::getText() Bug: T293512 Change-Id: Idf94eb65e0cf915792442458abba618c5feef86b --- includes/Variables/LazyVariableComputer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Variables/LazyVariableComputer.php b/includes/Variables/LazyVariableComputer.php index ebd4c1760..991c4388c 100644 --- a/includes/Variables/LazyVariableComputer.php +++ b/includes/Variables/LazyVariableComputer.php @@ -302,7 +302,8 @@ class LazyVariableComputer { } else { // Note: as of core change r727361, the PP limit comments (which we don't want to be here) // are already excluded. - $result = $editInfo->getOutput()->getText(); + $popts = $editInfo->popts; + $result = $editInfo->getOutput()->runOutputPipeline( $popts, [] )->getContentHolderText(); } self::$profilingExtraTime += ( microtime( true ) - $startTime ); } else { @@ -314,7 +315,8 @@ class LazyVariableComputer { $update = $parameters['update']; // Shared with the edit, don't count it in profiling $startTime = microtime( true ); - $result = $update->getCanonicalParserOutput()->getText(); + $popts = $update->getRenderedRevision()->getOptions(); + $result = $update->getCanonicalParserOutput()->runOutputPipeline( $popts, [] )->getContentHolderText(); self::$profilingExtraTime += ( microtime( true ) - $startTime ); break; case 'strip-html':