diff --git a/rocket-nginx.ini.disabled b/rocket-nginx.ini.disabled index 07a1140..332ba11 100644 --- a/rocket-nginx.ini.disabled +++ b/rocket-nginx.ini.disabled @@ -1,7 +1,7 @@ ; Rocket-Nginx configuration file ; Author: Maxime Jobin ; URL: https://github.com/maximejobin/rocket-nginx -; Version: 2.1 +; Version: 2.1.1 ; Default configuration [default] diff --git a/rocket-nginx.tmpl b/rocket-nginx.tmpl index 4cb2e08..2950b90 100644 --- a/rocket-nginx.tmpl +++ b/rocket-nginx.tmpl @@ -10,7 +10,7 @@ # Tested with WP-Rocket version: 2.10.9 # Tested with NGINX: 1.13.4 (mainline) # -# Version 2.1 +# Version 2.1.1 # ################################################################################################### diff --git a/rocket-parser.php b/rocket-parser.php index b8e0017..c640c42 100644 --- a/rocket-parser.php +++ b/rocket-parser.php @@ -8,7 +8,7 @@ * Author: Maxime Jobin * URL: https://github.com/maximejobin/rocket-nginx * -* Version 2.1 +* Version 2.1.1 * **************************************************************************************************/ @@ -138,11 +138,11 @@ protected function generateConfigurationFiles($config) { $output = str_replace('#!# HEADER_MEDIAS #!#', $medias_header, $output); // Media extensions - $medias_extension = ''; - if (isset($section['medias_extension']) && is_array($section['medias_extension'])) { - $medias_extension = $this->getGeneratedHeaders($section['medias_extension']); + $media_extensions = ''; + if (isset($section['media_extensions']) && !empty($section['media_extensions'])) { + $media_extensions = $section['media_extensions']; } - $output = str_replace('#!# EXTENSION_MEDIAS #!#', $medias_extension, $output); + $output = str_replace('#!# EXTENSION_MEDIAS #!#', $media_extensions, $output); // Output the file @@ -218,7 +218,6 @@ public function go() { $this->checkConfigurationFile(); $data = $this->parseIniFile(); - $this->generateConfigurationFiles($data); } }