From 6fa755e68ef126a0ccd33bb5b017d2fe8c7d1edb Mon Sep 17 00:00:00 2001 From: dd32 Date: Wed, 17 Aug 2011 08:51:36 +0000 Subject: [PATCH] Harden up is_user_logged_in() against empty $current_user instances to prevent PHP Notices on XML-RPC requests. Fixes #18458 git-svn-id: http://svn.automattic.com/wordpress/trunk@18558 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index fab5d41b94..8b895306af 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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;