Avoid Notice if the query doesn't have a post set e.g. on a 404 . Fixes #15059 props chrisbliss18.
git-svn-id: https://develop.svn.wordpress.org/trunk@15750 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bf878cad07
commit
3e66b217cc
@ -440,7 +440,7 @@ class WP {
|
||||
|
||||
$GLOBALS['query_string'] = $this->query_string;
|
||||
$GLOBALS['posts'] = & $wp_query->posts;
|
||||
$GLOBALS['post'] = $wp_query->post;
|
||||
$GLOBALS['post'] = (isset($wp_query->post)) ? $wp_query->post : null;
|
||||
$GLOBALS['request'] = $wp_query->request;
|
||||
|
||||
if ( is_single() || is_page() ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user