Подскажите как решить.
Warning: count(): Parameter must be an array or an object that implements Countable
PHP 7.2
// Check global in case errors have been added on this pageload.
if ( ! count( $wp_settings_errors ) )
return array();
// Filter the results to those of a specific setting if one was set.
if ( $setting ) {
$setting_errors = array();
foreach ( (array) $wp_settings_errors as $key => $details ) {
if ( $setting == $details['setting'] )
$setting_errors[] = $wp_settings_errors[$key];
}
return $setting_errors;
}
return $wp_settings_errors;
}