Skip to content

Commit

Permalink
Improve variable names.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 30, 2025
1 parent ebaf914 commit 3fd2558
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions module/VuFind/src/VuFind/Bootstrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,17 @@ protected function initUserLanguage(): void
protected function initTheme(): void
{
// Attach remaining theme configuration to the dispatch event at high priority:
$config = $this->config->Site;
$callback = function ($event) use ($config) {
$theme = new \VuFindTheme\Initializer($config, $event);
$siteConfig = $this->config->Site;
$callback = function ($event) use ($siteConfig) {
$theme = new \VuFindTheme\Initializer($siteConfig, $event);
try {
$theme->init();
} catch (\Exception $e) {
// Try to display an error page if the theme fails to initialize:
$config = $this->container->get('config');
$appConfig = $this->container->get('config');
$model = $event->getViewModel();
$model->setTemplate('error/index');
$model->display_exceptions = $config['view_manager']['display_exceptions'] ?? false;
$model->display_exceptions = $appConfig['view_manager']['display_exceptions'] ?? false;
$model->exception = $e;
}
};
Expand Down

0 comments on commit 3fd2558

Please sign in to comment.