From 77c3f51118a7a2d92d806f3c1c8a915e793af637 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 7 Apr 2016 11:51:22 +0200 Subject: [PATCH] Additional check that class exists before loading --- system/src/Grav/Common/Twig/Twig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Twig/Twig.php b/system/src/Grav/Common/Twig/Twig.php index 391d7ad31..7e4a083f8 100644 --- a/system/src/Grav/Common/Twig/Twig.php +++ b/system/src/Grav/Common/Twig/Twig.php @@ -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');