Ensure that sticky_posts is an array (#935)

This commit is contained in:
Matt Wiebe 2024-10-10 18:31:09 -05:00 committed by GitHub
parent d532f8be06
commit 460174c9a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -218,7 +218,7 @@ class Collection {
if ( ! is_single_user() && User_Collection::BLOG_USER_ID === $user->get__id() ) {
$posts = array();
} elseif ( $sticky_posts ) {
} elseif ( is_array( $sticky_posts ) ) {
$args = array(
'post__in' => $sticky_posts,
'ignore_sticky_posts' => 1,