Notice fix. see #7509

git-svn-id: https://develop.svn.wordpress.org/trunk@8647 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-14 20:36:09 +00:00
parent 197fc1d118
commit b8c683da8d
1 changed files with 5 additions and 3 deletions

View File

@ -1904,10 +1904,12 @@ function get_all_page_ids() {
*/
function &get_page(&$page, $output = OBJECT, $filter = 'raw') {
if ( empty($page) ) {
if ( isset( $GLOBALS['page'] ) && isset( $GLOBALS['page']->ID ) )
if ( isset( $GLOBALS['page'] ) && isset( $GLOBALS['page']->ID ) ) {
return get_post($GLOBALS['page'], $output, $filter);
else
return null;
} else {
$page = null;
return $page;
}
}
return get_post($page, $output, $filter);