diff --git a/src/Environment.php b/src/Environment.php index be182c827..349d8efd8 100644 --- a/src/Environment.php +++ b/src/Environment.php @@ -119,7 +119,7 @@ class Environment $this->debug = (bool) $options['debug']; $this->setCharset($options['charset']); $this->baseTemplateClass = '\\'.ltrim($options['base_template_class'], '\\'); - if (Template::class !== $this->baseTemplateClass && '\Twig_Template' !== $this->baseTemplateClass) { + if ('\\'.Template::class !== $this->baseTemplateClass && '\Twig_Template' !== $this->baseTemplateClass) { @trigger_error('The "base_template_class" option on '.__CLASS__.' is deprecated since Twig 2.7.0.', E_USER_DEPRECATED); } $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];