diff --git a/includes/newspack-listings-utils.php b/includes/newspack-listings-utils.php index 8675c0a2..420bf297 100644 --- a/includes/newspack-listings-utils.php +++ b/includes/newspack-listings-utils.php @@ -107,7 +107,7 @@ function get_data_from_blocks( $blocks, $source ) { } // If the source has 'single' specified, only get data from the first found block instance. - if ( $source['single'] ) { + if ( isset( $source['single'] ) && ! empty( $source['single'] ) ) { $matching_blocks = array_slice( $matching_blocks, 0, 1 ); } @@ -138,7 +138,7 @@ function get_data_from_blocks( $blocks, $source ) { } // If the source has 'single' specified, only return data from the first found block instance. - if ( $source['single'] ) { + if ( isset( $source['single'] ) && ! empty( $source['single'] ) ) { return array_shift( $data ); }