Skip to content

Commit

Permalink
Use WP version as the revision when precaching if the revision is mis…
Browse files Browse the repository at this point in the history
…sing.
  • Loading branch information
miina committed Aug 7, 2018
1 parent 024eab3 commit 84258c0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions wp-includes/class-wp-service-workers.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,7 @@ protected function register_precaching_for_routes( $routes ) {
}

if ( ! isset( $params['revision'] ) ) {
$file_content = @file_get_contents( $validated_path ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, WordPress.WP.AlternativeFunctions.file_system_read_file_get_contents
if ( ! $file_content ) {
continue;
}
$params['revision'] = md5( $file_content );
$params['revision'] = get_bloginfo( 'version' );
}
$routes_list[] = array(
'url' => $params['url'],
Expand Down

0 comments on commit 84258c0

Please sign in to comment.