#36565 closed enhancement (duplicate)
Incorrect notice 'get_currentuserinfo' in WP 4.5
Reported by: | simonrcodrington | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5 |
Component: | Users | Keywords: | |
Focuses: | administration | Cc: |
Description
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
Change History (3)
#1
in reply to:
↑ description
@
8 years ago
- Component changed from Administration to Users
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
#2
@
8 years ago
- Type changed from defect (bug) to enhancement
This ticket is not a duplicate of #36517, but a suggested enhancement to show the actual line of usage in deprecated notices instead of the line where _deprecated_function()
resides.
I'm sure there's a ticket for that, though. Maybe you know the number of that one, @SergeyBiryukov?
Duplicate of #36517.