// Fix debug in smarty
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
class Smarty_Internal_Data {
|
||||
// class used for templates
|
||||
public $template_class = 'Smarty_Internal_Template';
|
||||
static public $duplicateLogs = array();
|
||||
/* static public $duplicateLogs = array();
|
||||
static public $listLogs = null;
|
||||
public function __destruct()
|
||||
{
|
||||
@@ -38,7 +38,7 @@ class Smarty_Internal_Data {
|
||||
}
|
||||
|
||||
file_put_contents(_PS_TOOL_DIR_.'smarty.duplicate.php', '<?php return '.var_export(self::$listLogs, true).';');
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* assigns a Smarty variable
|
||||
@@ -54,13 +54,13 @@ class Smarty_Internal_Data {
|
||||
if (is_array($tpl_var)) {
|
||||
foreach ($tpl_var as $_key => $_val) {
|
||||
if ($_key != '') {
|
||||
@$this->duplicateLog[$_key][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||
//@$this->duplicateLog[$_key][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||
$this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($tpl_var != '') {
|
||||
@$this->duplicateLog[$tpl_var][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||
//@$this->duplicateLog[$tpl_var][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||
$this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user