allow to activate debugging into Smarty
This commit is contained in:
@@ -53,6 +53,7 @@
|
|||||||
<argument type="service" id="event_dispatcher"/>
|
<argument type="service" id="event_dispatcher"/>
|
||||||
<argument >false</argument>
|
<argument >false</argument>
|
||||||
<argument >%kernel.environment%</argument>
|
<argument >%kernel.environment%</argument>
|
||||||
|
<argument >%kernel.debug%</argument>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<!-- Smarty parser plugins -->
|
<!-- Smarty parser plugins -->
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class SmartyParser extends Smarty implements ParserInterface {
|
|||||||
* @param bool $template
|
* @param bool $template
|
||||||
* @param string $env Environment define for the kernel application. Used for the cache directory
|
* @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();
|
parent::__construct();
|
||||||
|
|
||||||
@@ -53,6 +53,8 @@ class SmartyParser extends Smarty implements ParserInterface {
|
|||||||
$this->setCompileDir($compile_dir);
|
$this->setCompileDir($compile_dir);
|
||||||
$this->setCacheDir($cache_dir);
|
$this->setCacheDir($cache_dir);
|
||||||
|
|
||||||
|
$this->debugging = $debug;
|
||||||
|
|
||||||
// Prevent smarty ErrorException: Notice: Undefined index bla bla bla...
|
// Prevent smarty ErrorException: Notice: Undefined index bla bla bla...
|
||||||
$this->error_reporting = E_ALL ^ E_NOTICE;
|
$this->error_reporting = E_ALL ^ E_NOTICE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user