diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index 6d166c61561e38003d4582e7257bcb9fe4b04a41..519711babd3d6bf9deba07a74855f36ceb1b2b6e 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -394,9 +394,19 @@ $config = array( ); // Set up language caching for better performance: - $translator->setCache( - $sm->get('VuFind\CacheManager')->getCache('language') - ); + try { + $translator->setCache( + $sm->get('VuFind\CacheManager')->getCache('language') + ); + } catch (\Exception $e) { + // Don't let a cache failure kill the whole application, but make + // note of it: + $logger = $sm->get('VuFind\Logger'); + $logger->debug( + 'Problem loading cache: ' . get_class($e) . ' exception: ' + . $e->getMessage() + ); + } return $translator; },