Opened 7 weeks ago
Closed 8 days ago
#62228 closed defect (bug) (worksforme)
Function get_usermeta is deprecated and Function has_cap was called with an argument that is deprecated
Reported by: | archerdev | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | close |
Focuses: | administration, php-compatibility | Cc: |
Description
We recently upgraded our WP to PHP 8.2, with WP DEBUG on, and after doing so, we saw the below deprecation messages at the top of the admin. This interfered with testing and the deprecation message changes to the admin UI even broke the Media Library grid view.
Deprecated: Function get_usermeta is deprecated since version 3.0.0! Use get_user_meta() instead. in /var/www/html/wp-includes/functions.php on line 6085
Deprecated: Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in /var/www/html/wp-includes/functions.php on line 6085
Attachments (1)
Change History (3)
#1
@
7 weeks ago
- Focuses ui removed
- Keywords close added
Hello @archerdev and welcome to Trac.
The message says some code is doing something wrong and/or deprecated. These warnings are then emitted because you have WP_DEBUG and display_errors on in wp-config.php. It probably has nothing to with the PHP version. It's generally recommended not to display errors to the browser, but write them to the debug log.
It's probably a plugin or your theme doing this. Did you try with no active plugins and a default theme?
Since this is most cerainly not because of a bug in WordPress core, and since this system is for tracking defects and enhancements for core, not a support forum, I suggest trying the support forums to get help with this and closing this ticket.
#2
@
8 days ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
Thank you for raising this @archerdev and @knutsp for triaging this. I am going to agree with the recommendation to close. This doesn't mean it can't be reopened if more information is found. For now, though, let's progress with closing; thank you again.
Screenshot of deprecation messages and broken media library grid view