Avoid Notice if the query doesn't have a post set e.g. on a 404 . Fixes #15059 props chrisbliss18.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e5c6cb031
commit
f964eed6b5
|
@ -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…
Reference in New Issue