From fff8c0a44ded49556190b2cf5fbb1e3528d6f640 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 3 Oct 2021 23:12:42 +0200 Subject: [PATCH] Call getHtml on the content object, not TextContent TextContent does not provide such a function, but it is possible that sub classes provides a protected function with this name. Bug: T292374 Change-Id: I56397a085226538a8156e0e7a195db463240624c --- includes/content/TextContentHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/content/TextContentHandler.php b/includes/content/TextContentHandler.php index b9f99e6dd71..ca980ecc385 100644 --- a/includes/content/TextContentHandler.php +++ b/includes/content/TextContentHandler.php @@ -231,7 +231,7 @@ class TextContentHandler extends ContentHandler { if ( $cpoParams->getGenerateHtml() ) { // Temporary changes as getHtml() is deprecated, we are working on removing usage of it. if ( method_exists( $content, 'getHtml' ) ) { - $method = new ReflectionMethod( 'TextContent', 'getHtml' ); + $method = new ReflectionMethod( $content, 'getHtml' ); $method->setAccessible( true ); $html = $method->invoke( $content ); } else {