From d4d0713573edf335fd0b20d1037495c2b26c37f4 Mon Sep 17 00:00:00 2001 From: AltamashShaikh Date: Mon, 25 Feb 2019 20:08:37 +0530 Subject: [PATCH] Updated regex matching code to check for non zero errors The Regex matching code in wp cli is taking "0 Errors" in consideration while evaluating the install is compatible and hence it gives a false alert --- src/wpcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wpcli.php b/src/wpcli.php index cdc4de9..07d44df 100644 --- a/src/wpcli.php +++ b/src/wpcli.php @@ -53,7 +53,7 @@ function __invoke( $args, $assoc_args ) { $wpephpc->clean_after_scan(); delete_option( 'wpephpcompat.scan_results' ); - if ( preg_match( '/(\d*) ERRORS?/i', $results ) ) { + if ( preg_match( '/([1-9][0-9]*) ERRORS?/i', $results ) ) { WP_CLI::error( 'Your WordPress install is not compatible.' ); } else { WP_CLI::success( 'Your WordPress install is compatible.' );