From 67bbfe58ad67aa80e0e9ac601de6325690fce9a9 Mon Sep 17 00:00:00 2001 From: thiemowmde Date: Thu, 9 Nov 2023 11:42:27 +0100 Subject: [PATCH] Drop obsolete PHP 7.2 "arrayToObject" workaround According to T228346 and T254519 this is a workaround for a PHP 7.2 bug. We require PHP 7.4 by now. Not used anywhere outside of this codebase: https://codesearch.wmcloud.org/search/?q=PHPU%5Cw*%3A%3AarrayToObject&files=%5C.php%24 Bug: T254519 Change-Id: I4150900e59c5bd865ce102417ac354a54552e623 --- src/Parsoid/References.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parsoid/References.php b/src/Parsoid/References.php index d4e38a313..4cea3cc68 100644 --- a/src/Parsoid/References.php +++ b/src/Parsoid/References.php @@ -545,7 +545,7 @@ class References extends ExtensionTagHandler { } elseif ( count( $nestedRefsHTML ) > 0 ) { $dataMw->body = (object)[ 'html' => "\n" . implode( $nestedRefsHTML ) ]; } elseif ( empty( $dp->selfClose ) ) { - $dataMw->body = PHPUtils::arrayToObject( [ 'html' => '' ] ); + $dataMw->body = (object)[ 'html' => '' ]; } else { unset( $dataMw->body ); }