Prevent notice check on invalid sticky settings. See #9393 props nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@11230 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8e3c9121f8
commit
5173e6c7f8
|
@ -2304,7 +2304,7 @@ class WP_Query {
|
||||||
|
|
||||||
// Put sticky posts at the top of the posts array
|
// Put sticky posts at the top of the posts array
|
||||||
$sticky_posts = get_option('sticky_posts');
|
$sticky_posts = get_option('sticky_posts');
|
||||||
if ( $this->is_home && $page <= 1 && !empty($sticky_posts) && !$q['caller_get_posts'] ) {
|
if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) {
|
||||||
$num_posts = count($this->posts);
|
$num_posts = count($this->posts);
|
||||||
$sticky_offset = 0;
|
$sticky_offset = 0;
|
||||||
// Loop over posts and relocate stickies to the front.
|
// Loop over posts and relocate stickies to the front.
|
||||||
|
|
Loading…
Reference in New Issue