From ef32effe35f1228db3f5c860dfe07dc8684f64fe Mon Sep 17 00:00:00 2001 From: "d.savuljesku" Date: Tue, 8 Nov 2022 14:58:00 +0100 Subject: [PATCH] Fix calling array function on stdClass Bug: T322634 Change-Id: I8c7c7004128da9de6f266ebca43b9aa78802a2de --- src/MathMathMLCli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MathMathMLCli.php b/src/MathMathMLCli.php index 6b4905a4e..81a24f6fc 100644 --- a/src/MathMathMLCli.php +++ b/src/MathMathMLCli.php @@ -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.' .