mirror of
https://github.com/getgrav/grav.git
synced 2026-03-21 03:51:34 +01:00
Additional check that class exists before loading
This commit is contained in:
@@ -146,7 +146,9 @@ class Twig
|
||||
|
||||
// enable the Intl Twig extension if translations are enabled
|
||||
if (count($config->get('system.languages.supported', [])) > 0) {
|
||||
$this->twig->addExtension(new \Twig_Extensions_Extension_Intl());
|
||||
if (class_exists('\Twig_Extensions_Extension_Intl')) {
|
||||
$this->twig->addExtension(new \Twig_Extensions_Extension_Intl());
|
||||
}
|
||||
}
|
||||
|
||||
$this->grav->fireEvent('onTwigExtensions');
|
||||
|
||||
Reference in New Issue
Block a user