diff --git a/src/class-plugin-curated-posts.php b/src/class-plugin-curated-posts.php index f9a05d3..fae0b9d 100644 --- a/src/class-plugin-curated-posts.php +++ b/src/class-plugin-curated-posts.php @@ -77,7 +77,7 @@ public function with_query_context( array $context, array $attributes, WP_Block_ $pinned_posts = array_map( fn ( $id ) => $id && 'publish' === get_post_status( $id ) ? $id : null, $pinned_posts ); $queries = new Positioned_Post_Queries( - positioned: $pinned_posts, + positioned: is_array( $pinned_posts ) ? $pinned_posts : [], default_per_page: $args['posts_per_page'], origin: $this->queries, );