Notice fix. see #7509

git-svn-id: http://svn.automattic.com/wordpress/trunk@8647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-08-14 20:36:09 +00:00
parent 113c014920
commit aaaffe8316
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);