[wp-trac] [WordPress Trac] #36565: Incorrect notice 'get_currentuserinfo' in WP 4.5

WordPress Trac noreply at wordpress.org
Mon Apr 18 00:58:57 UTC 2016


#36565: Incorrect notice 'get_currentuserinfo' in WP 4.5
------------------------------+-----------------------------
 Reporter:  simonrcodrington  |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Administration    |    Version:  4.5
 Severity:  normal            |   Keywords:
  Focuses:  administration    |
------------------------------+-----------------------------
 Hey guys

 In the process of updating several of my clients websites to WP 4.5, I've
 noticed the following when I have WP_DEBUG enabled

 `Notice: get_currentuserinfo is deprecated since version 4.5! Use
 wp_get_current_user() instead. in {website_dir}/wp-includes/functions.php
 on line 3662` (where website_dir is the full directory path for website)

 I've taken a look into this function and it looks like WordPress is
 calling `_deprecated_function` and inside there on line 3662 it is
 executing

 `trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since
 version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );`

 From what I can see something is calling `get_currentuserinfo` but this
 debug isn't really helpful (I'm not sure if this is a plugin that's
 causing this or something in my theme).

 I'm almost 100% sure I've seen these warnings and they usually provide a
 location as to where the depreciated function was called from.

 I assume somewhere in core the `_deprecated_function` is being called for
 `get_currentuserinfo`. It would be good if it also outlined where the
 deprecated function is being used.

 Let me know if I can be of any help / if you guys need further
 information.

 Cheers

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36565>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list