#47774 closed defect (bug) (invalid)
PHP 7.2 > Warning: count(): Parameter must be an array or an object that implements Countable in .../wp-admin/user-edit.php on line 285
Reported by: | denismack | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.2.2 |
Component: | Users | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
Count() no longer returns null.
Incompatible with PHP > 7.2
<core>/wp-admin/user-edit.php on line 285:
<?php if ( count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) :
<?php if ( is_array( $_wp_admin_css_colors ) && count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) :
Fixed count(): Parameter must be an array
Change History (3)
#2
in reply to:
↑ 1
@
5 years ago
- Resolution set to invalid
- Status changed from new to closed
Replying to jorbin:
Can you provide steps to reproduce this? Using a stock install of WordPress, I'm unable to replicate it. It would appear as though a piece of custom code is overriding the global variable
$_wp_admin_css_colors
and that is causing the notice for you.
You're right. It's a plugin error while overwriting the $ _wp_admin_css_colors
global variable.
Thank you @jorbin
Note: See
TracTickets for help on using
tickets.
Can you provide steps to reproduce this? Using a stock install of WordPress, I'm unable to replicate it. It would appear as though a piece of custom code is overriding the global variable
$_wp_admin_css_colors
and that is causing the notice for you.