diff --git a/inc/Engine/Media/Fonts/Filesystem.php b/inc/Engine/Media/Fonts/Filesystem.php index 105212f981..5c3b64ea35 100644 --- a/inc/Engine/Media/Fonts/Filesystem.php +++ b/inc/Engine/Media/Fonts/Filesystem.php @@ -103,6 +103,7 @@ public function write_font_css( string $font_url, string $provider ): bool { if ( ! $this->filesystem->exists( $local_path ) ) { $download_start = microtime( true ); + $font_content = $this->get_remote_content( $font_url ); if ( ! $font_content ) { @@ -132,7 +133,7 @@ public function write_font_css( string $font_url, string $provider ): bool { // Add for test purpose. Logger::debug( "Font download and optimization duration in seconds -- $duration", [ 'Host Fonts Locally' ] ); Logger::debug( "Number of fonts downloaded -- $count_fonts", [ 'Host Fonts Locally' ] ); - Logger::debug( "Average download time per font -- " . ( $count_fonts ? $download_average / $count_fonts : 0 ), [ 'Host Fonts Locally' ] ); + Logger::debug( 'Average download time per font -- ' . ( $count_fonts ? $download_average / $count_fonts : 0 ), [ 'Host Fonts Locally' ] ); return $this->write_file( $css_filepath, $local_css ); }