#55912 closed defect (bug) (invalid)
count( $_wp_admin_css_colors ) in user-edit.php not php 8 friendly when int given
Reported by: | rambillo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Users | Keywords: | php8 |
Focuses: | Cc: |
Description
Running WordPress core v6.0 with PHP v8.0.14, all plugins turned off, and a default theme (on a long running installation of WordPress), we're getting:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, int given in /.../wp-admin/user-edit.php:303 Stack trace: #0 /.../wp-admin/profile.php(18): require_once() #1 {main} thrown in /.../wp-admin/user-edit.php on line 303 There has been a critical error on this website. Please check your site admin email inbox for instructions.
The code on that line suggests it could be addressed via:
if ( is_countable( $_wp_admin_css_colors ) && count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) : ?>
Change History (2)
Note: See
TracTickets for help on using
tickets.
Disregard. The issue was between the seat and the keyboard.