Fix calling array function on stdClass

Bug: T322634
Change-Id: I8c7c7004128da9de6f266ebca43b9aa78802a2de
(cherry picked from commit ef32effe35)
This commit is contained in:
d.savuljesku 2022-11-08 14:58:00 +01:00 committed by Reedy
parent 3c3ad511c3
commit 06bac0d920

View file

@ -70,7 +70,7 @@ class MathMathMLCli extends MathMathML {
// cli interface seems to be OK.
$this->processJsonResult( $response, 'file://' . $wgMathoidCli[0] );
$this->mathStyle = $response->mathoidStyle;
if ( array_key_exists( 'png', $response ) ) {
if ( property_exists( $response, 'png' ) ) {
$this->png = implode( array_map( "chr", $response->png->data ) );
} else {
LoggerFactory::getInstance( 'Math' )->error( 'Mathoid did not return a PNG image.' .