From a2e06c78e7b302178e1f720ed358166a7f519e2f Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Fri, 11 Sep 2026 12:14:10 +0530 Subject: [PATCH] Replace array_key_last with array_last --- src/wp-includes/class-wp-block-parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-block-parser.php b/src/wp-includes/class-wp-block-parser.php index 81cb7a8fa21f7..6c1eb715a7ac1 100644 --- a/src/wp-includes/class-wp-block-parser.php +++ b/src/wp-includes/class-wp-block-parser.php @@ -342,7 +342,7 @@ public function add_freeform( $length = null ) { * @param int|null $last_offset Last byte offset into document if continuing form earlier output. */ public function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) { - $parent = $this->stack[ array_key_last( $this->stack ) ]; + $parent = array_last( $this->stack ); $parent->block->innerBlocks[] = (array) $block; $html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );