aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php')
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
index b317c9f33..de7d4a224 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -94,9 +94,9 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
break;
}
if (strpos($_index[ 1 ], '$') === false && strpos($_index[ 1 ], '\'') === false) {
- return "@constant('{$_index[1]}')";
+ return "(defined('{$_index[1]}') ? constant('{$_index[1]}') : null)";
} else {
- return "@constant({$_index[1]})";
+ return "(defined({$_index[1]}) ? constant({$_index[1]}) : null)";
}
// no break
case 'config':