From 433673c7a83e314040e52ce283bb1379bbcc03dc Mon Sep 17 00:00:00 2001 From: Ramon Date: Wed, 16 Aug 2023 09:06:40 +1000 Subject: [PATCH] Adding an is_array check before using count in case $footnotes is not countable (#53660) --- packages/block-library/src/footnotes/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/footnotes/index.php b/packages/block-library/src/footnotes/index.php index bd7734d7d02d15..444d13f4ec590c 100644 --- a/packages/block-library/src/footnotes/index.php +++ b/packages/block-library/src/footnotes/index.php @@ -34,7 +34,7 @@ function render_block_core_footnotes( $attributes, $content, $block ) { $footnotes = json_decode( $footnotes, true ); - if ( count( $footnotes ) === 0 ) { + if ( ! is_array( $footnotes ) || count( $footnotes ) === 0 ) { return ''; }