Notice fixing for wp-includes. See #5607 props filosofo.

git-svn-id: https://develop.svn.wordpress.org/trunk@6592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2008-01-10 20:51:07 +00:00
parent 0480fcbf68
commit 90e193bdab
8 changed files with 46 additions and 29 deletions

View File

@@ -157,12 +157,13 @@ function get_extended($post) {
*/
function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
global $wpdb;
$null = null;
if ( empty($post) ) {
if ( isset($GLOBALS['post']) )
$_post = & $GLOBALS['post'];
else
return null;
return $null;
} elseif ( is_object($post) ) {
wp_cache_add($post->ID, $post, 'posts');
$_post = &$post;