Skip to content

Commit 1767e41

Browse files
committed
Only update the progress count if it makes sense.
1 parent 591e1aa commit 1767e41

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/js/run.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ function checkStatus() {
9494
jQuery( '#wpe-progress' ).show();
9595

9696
// Display the current plugin count.
97-
jQuery( '#wpe-progress-count' ).text( ( obj.total - obj.count + 1 ) + '/' + obj.total );
97+
if ( obj.total ) {
98+
jQuery( '#wpe-progress-count' ).text( ( obj.total - obj.count + 1 ) + '/' + obj.total );
99+
}
98100

99101
// Display the object being scanned.
100102
jQuery( '#wpe-progress-active' ).text( obj.activeJob );

wpengine-phpcompat.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function check_status() {
157157
wp_send_json( $to_encode );
158158
}
159159
}
160-
160+
161161
/**
162162
* Make an Ajax call to start the scan in the background.
163163
*
@@ -170,13 +170,13 @@ function fork_scan( $test_version, $only_active ) {
170170
$query = array(
171171
'action' => 'wpephpcompat_start_test',
172172
);
173-
173+
174174
// Keep track of these variables.
175175
$body = array(
176176
'test_version'=> $test_version,
177177
'only_active'=> $only_active,
178178
);
179-
179+
180180
// Instantly return!
181181
$args = array(
182182
'timeout' => 0.01,
@@ -188,7 +188,7 @@ function fork_scan( $test_version, $only_active ) {
188188

189189
// Build our URL.
190190
$url = add_query_arg( $query, admin_url( 'admin-ajax.php' ) );
191-
191+
$url = str_replace( '8081', '80', $url );
192192
// POST.
193193
wp_remote_post( esc_url_raw( $url ), $args );
194194
}

0 commit comments

Comments
 (0)