Fix calling array function on stdClass

Bug: T322634
Change-Id: I8c7c7004128da9de6f266ebca43b9aa78802a2de
This commit is contained in:
d.savuljesku 2022-11-08 14:58:00 +01:00
parent e0e2d6da23
commit ef32effe35

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.' .