The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit cb70ff78 authored by Demian Katz's avatar Demian Katz
Browse files

Don't let cache failure break translator.

parent 67af726f
No related merge requests found
......@@ -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;
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment