aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php')
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php
index f16bd3fb1..c826a1786 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php
@@ -193,6 +193,9 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
*
* @param Smarty_Internal_Template|Smarty $obj object to debug
* @param bool $full
+ *
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function display_debug($obj, $full = false)
{
@@ -210,7 +213,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
// init properties by hand as user may have edited the original Smarty class
$debObj->setPluginsDir(is_dir(__DIR__ . '/../plugins') ? __DIR__ . '/../plugins' : $smarty->getPluginsDir());
$debObj->force_compile = false;
- $debObj->compile_check = true;
+ $debObj->compile_check = Smarty::COMPILECHECK_ON;
$debObj->left_delimiter = '{';
$debObj->right_delimiter = '}';
$debObj->security_policy = null;
@@ -224,7 +227,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$debObj->autoload_filters = array();
$debObj->default_modifiers = array();
$debObj->escape_html = true;
- $debObj->caching = false;
+ $debObj->caching = Smarty::CACHING_OFF;
$debObj->compile_id = null;
$debObj->cache_id = null;
// prepare information of assigned variables
@@ -239,7 +242,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
if ($obj->_isTplObj()) {
$_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);
}
- if ($obj->_objType == 1 || $full) {
+ if ($obj->_objType === 1 || $full) {
$_template->assign('template_data', $this->template_data[ $this->index ]);
} else {
$_template->assign('template_data', null);
@@ -247,7 +250,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_template->assign('assigned_vars', $_assigned_vars);
$_template->assign('config_vars', $_config_vars);
$_template->assign('execution_time', microtime(true) - $smarty->start_time);
- $_template->assign('display_mode', $debugging == 2 || !$full);
+ $_template->assign('display_mode', $debugging === 2 || !$full);
$_template->assign('offset', $this->offset * 50);
echo $_template->fetch();
if (isset($full)) {
@@ -281,15 +284,15 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$tpl_vars = array();
foreach ($obj->tpl_vars as $key => $var) {
foreach ($var as $varkey => $varvalue) {
- if ($varkey == 'value') {
+ if ($varkey === 'value') {
$tpl_vars[ $key ][ $varkey ] = $varvalue;
} else {
- if ($varkey == 'nocache') {
- if ($varvalue == true) {
+ if ($varkey === 'nocache') {
+ if ($varvalue === true) {
$tpl_vars[ $key ][ $varkey ] = $varvalue;
}
} else {
- if ($varkey != 'scope' || $varvalue !== 0) {
+ if ($varkey !== 'scope' || $varvalue !== 0) {
$tpl_vars[ $key ][ 'attributes' ][ $varkey ] = $varvalue;
}
}
@@ -323,15 +326,15 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
foreach (Smarty::$global_tpl_vars as $key => $var) {
if (!array_key_exists($key, $tpl_vars)) {
foreach ($var as $varkey => $varvalue) {
- if ($varkey == 'value') {
+ if ($varkey === 'value') {
$tpl_vars[ $key ][ $varkey ] = $varvalue;
} else {
- if ($varkey == 'nocache') {
- if ($varvalue == true) {
+ if ($varkey === 'nocache') {
+ if ($varvalue === true) {
$tpl_vars[ $key ][ $varkey ] = $varvalue;
}
} else {
- if ($varkey != 'scope' || $varvalue !== 0) {
+ if ($varkey !== 'scope' || $varvalue !== 0) {
$tpl_vars[ $key ][ 'attributes' ][ $varkey ] = $varvalue;
}
}
@@ -356,7 +359,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
{
static $_is_stringy = array('string' => true, 'eval' => true);
// calculate Uid if not already done
- if ($template->source->uid == '') {
+ if ($template->source->uid === '') {
$template->source->filepath;
}
$key = $template->source->uid;
@@ -386,7 +389,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function ignore(Smarty_Internal_Template $template)
{
// calculate Uid if not already done
- if ($template->source->uid == '') {
+ if ($template->source->uid === '') {
$template->source->filepath;
}
$this->ignore_uid[ $template->source->uid ] = true;