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
This commit is contained in:
Umherirrender 2021-10-03 23:12:42 +02:00
parent 42a24c3e98
commit fff8c0a44d

View file

@ -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 {