3

https://build.trac.wordpress.org/changeset/36278/trunk/wp-includes/pluggable-deprecated.php

After Install or update wordpress with 4.5. Generate error:

Notice : get_currentuserinfo is deprecated function since version 4.5! Use wp_get_current_user() instead. in wp-includes\functions.php on line 3662

More info for issue & solution

Ravi Patel
  • 5,121
  • 2
  • 25
  • 44
  • 1
    Why minus point? this one correct issue see on more info. – Ravi Patel Apr 13 '16 at 11:47
  • Note that it's generating a Notice, not an Error. This is significant, because it seems to indicate that your server is reporting PHP Notices. This may be because your wp-config.php has the "DEBUG" constant set to "true". If this is a production (ie: "live") web server, you should make sure that's turned off. On the other hand, if you're seeing this in a development server, then good for you - and resolve the issue as stated in the answer below. – Tom Auger May 31 '16 at 15:35

2 Answers2

3

Just find in plugin or theme with text "get_currentuserinfo" and replace with wp_get_current_user().

Because of deprecated function get_currentuserinfo and arrived new function _wp_get_current_user() Since: WordPress 4.5.0

function get_currentuserinfo() { 
   _deprecated_function( __FUNCTION__, '4.5', 'wp_get_current_user()' ); 
   return wp_get_current_user(); 
}
Ravi Patel
  • 5,121
  • 2
  • 25
  • 44
0

Follow the below step. I recovered one of my blog from the same error. 1. Install query monitor plugin 2. Check out the admin bar notice and click on the highlighted warning. 3. The screen jumps to the detailed warning explanation. 4. The section Call Stack will tell you the exact location where get_currentuserinfo() is used. 5. To fix this issue just replace get_currentuserinfo() with wp_get_current_user()