Harden up is_user_logged_in() against empty $current_user instances to prevent PHP Notices on XML-RPC requests. Fixes #18458

git-svn-id: https://develop.svn.wordpress.org/trunk@18558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-08-17 08:51:36 +00:00
parent e139b9e2a0
commit 395a623c52
1 changed files with 1 additions and 1 deletions

View File

@ -755,7 +755,7 @@ if ( !function_exists('is_user_logged_in') ) :
function is_user_logged_in() {
$user = wp_get_current_user();
if ( $user->ID == 0 )
if ( empty( $user->ID ) )
return false;
return true;