From 14739e47dbf277e8123d6e8d289f87902ebd4dec Mon Sep 17 00:00:00 2001 From: Jonny Harris Date: Wed, 13 Sep 2023 13:28:02 +0100 Subject: [PATCH] Block API: Unnecessary JSON decoding in block parser From @dlh01 Details in https://core.trac.wordpress.org/ticket/59168 --- .../class-wp-block-parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-serialization-default-parser/class-wp-block-parser.php b/packages/block-serialization-default-parser/class-wp-block-parser.php index 61f287b21fc4e8..5790e97f8cf298 100644 --- a/packages/block-serialization-default-parser/class-wp-block-parser.php +++ b/packages/block-serialization-default-parser/class-wp-block-parser.php @@ -73,7 +73,7 @@ public function parse( $document ) { $this->offset = 0; $this->output = array(); $this->stack = array(); - $this->empty_attrs = json_decode( '{}', true ); + $this->empty_attrs = array(); while ( $this->proceed() ) { continue;