-
-
Save paulgibbs/1f0c9b60374c45c4f0f1ed27bcd9f952 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/wp-includes/capabilities.php | |
=================================================================== | |
--- src/wp-includes/capabilities.php (revision 38699) | |
+++ src/wp-includes/capabilities.php (working copy) | |
@@ -470,7 +470,7 @@ | |
$current_user = wp_get_current_user(); | |
- if ( empty( $current_user ) ) { | |
+ if ( ! $current_user->ID ) { | |
if ( $switched ) { | |
restore_current_blog(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at WP style a bit more, this would probably actually be replaced with
if ( ! $user->exists() ) {
, which does pretty much the same thing.