diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 68d865089f..fe68d7f760 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6040,11 +6040,15 @@ function get_file_data( $file, $default_headers, $context = '' ) { // We don't need to write to the file, so just open for reading. $fp = fopen( $file, 'r' ); - // Pull only the first 8 KB of the file in. - $file_data = fread( $fp, 8 * KB_IN_BYTES ); + if ( $fp ) { + // Pull only the first 8 KB of the file in. + $file_data = fread( $fp, 8 * KB_IN_BYTES ); - // PHP will close file handle, but we are good citizens. - fclose( $fp ); + // PHP will close file handle, but we are good citizens. + fclose( $fp ); + } else { + $file_data = ''; + } // Make sure we catch CR-only line endings. $file_data = str_replace( "\r", "\n", $file_data ); diff --git a/wp-includes/version.php b/wp-includes/version.php index ff7dfb6f77..8a841a477e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49072'; +$wp_version = '5.6-alpha-49073'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.