mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +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,
|
- remove E_NOTICE warnings from debug.tpl,
|
||||||
escape modifier (Kanstantin, Monte)
|
escape modifier (Kanstantin, Monte)
|
||||||
- don't count non-ascii chars in count_words modifier
|
- don't count non-ascii chars in count_words modifier
|
||||||
|
@@ -1780,7 +1780,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
|
|
||||||
case 'const':
|
case 'const':
|
||||||
array_shift($indexes);
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -1780,7 +1780,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
|
|
||||||
case 'const':
|
case 'const':
|
||||||
array_shift($indexes);
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user