diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml
index a09cc086c..710cfabfd 100755
--- a/core/lib/Thelia/Config/Resources/config.xml
+++ b/core/lib/Thelia/Config/Resources/config.xml
@@ -53,6 +53,7 @@
false
%kernel.environment%
+ %kernel.debug%
diff --git a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php
index 387d0a820..8e2497fbc 100755
--- a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php
+++ b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php
@@ -33,7 +33,7 @@ class SmartyParser extends Smarty implements ParserInterface {
* @param bool $template
* @param string $env Environment define for the kernel application. Used for the cache directory
*/
- public function __construct(Request $request, EventDispatcherInterface $dispatcher, $template = false, $env = "prod")
+ public function __construct(Request $request, EventDispatcherInterface $dispatcher, $template = false, $env = "prod", $debug = false)
{
parent::__construct();
@@ -53,6 +53,8 @@ class SmartyParser extends Smarty implements ParserInterface {
$this->setCompileDir($compile_dir);
$this->setCacheDir($cache_dir);
+ $this->debugging = $debug;
+
// Prevent smarty ErrorException: Notice: Undefined index bla bla bla...
$this->error_reporting = E_ALL ^ E_NOTICE;