diff --git a/includes/CLI/Plugin_Check_Command.php b/includes/CLI/Plugin_Check_Command.php index 547373d5..28e8acf3 100644 --- a/includes/CLI/Plugin_Check_Command.php +++ b/includes/CLI/Plugin_Check_Command.php @@ -686,9 +686,8 @@ private function get_filtered_results_by_severity( $results, $error_severity, $w if ( 'ERROR' === $item['type'] && $item['severity'] >= $error_severity ) { $errors[] = $item; } elseif ( $include_low_severity_errors && 'ERROR' === $item['type'] && $item['severity'] < $error_severity ) { - $item['type'] = 'WARNING'; - $item['severity'] = 10; - $warnings[] = $item; + $item['type'] = 'ERROR_EXTRA'; + $warnings[] = $item; } elseif ( 'WARNING' === $item['type'] && $item['severity'] >= $warning_severity ) { $warnings[] = $item; } diff --git a/tests/behat/features/plugin-check-severity.feature b/tests/behat/features/plugin-check-severity.feature index 0f649488..5b0a41ba 100644 --- a/tests/behat/features/plugin-check-severity.feature +++ b/tests/behat/features/plugin-check-severity.feature @@ -199,11 +199,11 @@ Feature: Test that the severity level in plugin check works. """ And STDOUT should contain: """ - default_readme_text,WARNING,7 + WordPress.WP.AlternativeFunctions.rand_mt_rand,ERROR_EXTRA,5 """ And STDOUT should contain: """ - upgrade_notice_limit,WARNING,10 + WordPress.Security.EscapeOutput.OutputNotEscaped,ERROR_EXTRA,5 """ When I run the WP-CLI command `plugin check foo-bar-wp --format=csv --fields=code,type,severity --severity=10`