[wp-trac] [WordPress Trac] #35340: PHP Fatal Error: Call to undefined method WP_Error::exists()
WordPress Trac
noreply at wordpress.org
Thu Jan 7 02:24:01 UTC 2016
#35340: PHP Fatal Error: Call to undefined method WP_Error::exists()
--------------------------+------------------------------
Reporter: crackhd | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.4
Severity: minor | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by crackhd):
Finally fix is in third function:
{{{
function wpse_lost_password_redirect()
{
wp_redirect(home_url('/login?msg=passwordchanged'));
exit;
}
// Fixing error
global $user;
if (isset($user) && $user != null && !($user instanceof WP_Error))
add_action('password_reset', 'wpse_lost_password_redirect');
}}}
Sorry it was my mistake i didn't notice before, probably.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35340#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list