diff -u b/src/EventSubscriber/Fast404EventSubscriber.php b/src/EventSubscriber/Fast404EventSubscriber.php --- b/src/EventSubscriber/Fast404EventSubscriber.php +++ b/src/EventSubscriber/Fast404EventSubscriber.php @@ -27,7 +27,7 @@ public $requestStack; /** - * The language mananger + * The language manager. * * @var \Drupal\Core\Language\LanguageManagerInterface */ diff -u b/src/Fast404.php b/src/Fast404.php --- b/src/Fast404.php +++ b/src/Fast404.php @@ -41,7 +41,7 @@ public $loadHtml = TRUE; /** - * The langcode, this will help us to load the translated 404 page if it exists. + * The langcode to use for the translated 404 page if it exists. * * @var string */ @@ -213,13 +213,15 @@ // If a file is set to provide us with Fast 404 joy, load it. if (($this->loadHtml || Settings::get('fast404_HTML_error_all_paths', FALSE) === TRUE)) { if (is_array($custom_404)) { - // If it is an array, get path depending on the langcode, if langcode is NULL, default to the first value. + // If it is an array, get path depending on the langcode; + // if langcode is NULL, default to the first value. $custom_404_path = $this->langcode && isset($custom_404[$this->langcode]) ? $custom_404[$this->langcode] : reset($custom_404); - } else { + } + else { $custom_404_path = $custom_404; } - if(file_exists($custom_404_path)) { + if (file_exists($custom_404_path)) { $message = @file_get_contents($custom_404_path, FALSE); } } diff -u b/tests/html/en.html b/tests/html/en.html --- b/tests/html/en.html +++ b/tests/html/en.html @@ -8,7 +8,7 @@