mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
support $smarty.const.$foo syntax
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- support $smarty.const.$foo syntax (messju, Monte)
|
||||
- remove E_NOTICE warnings from debug.tpl,
|
||||
escape modifier (Kanstantin, Monte)
|
||||
- don't count non-ascii chars in count_words modifier
|
||||
|
@@ -1780,7 +1780,7 @@ class Smarty_Compiler extends Smarty {
|
||||
|
||||
case 'const':
|
||||
array_shift($indexes);
|
||||
$compiled_ref = '(defined(\'' . substr($indexes[0],1) . '\') ? ' . substr($indexes[0],1) . ' : null)';
|
||||
$compiled_ref = '(defined("' . substr($indexes[0],1) . '") ? ' . substr($indexes[0],1) . ' : null)';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -1780,7 +1780,7 @@ class Smarty_Compiler extends Smarty {
|
||||
|
||||
case 'const':
|
||||
array_shift($indexes);
|
||||
$compiled_ref = '(defined(\'' . substr($indexes[0],1) . '\') ? ' . substr($indexes[0],1) . ' : null)';
|
||||
$compiled_ref = '(defined("' . substr($indexes[0],1) . '") ? ' . substr($indexes[0],1) . ' : null)';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user