mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
name=123 is passed as an integer (not a string) to plugins now
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- name=123 is passed as an integer (not a string) to plugins now (messju)
|
||||
- $length is now propagated to sub-values in debug_print_var (messju)
|
||||
|
||||
Version 2.5.0-RC2 (March 26, 2003)
|
||||
|
@@ -1354,6 +1354,8 @@ class Smarty_Compiler extends Smarty {
|
||||
$token = 'false';
|
||||
} else if ($token == 'null') {
|
||||
$token = 'null';
|
||||
} else if (preg_match('!^-?[0-9]+$!', $token)) {
|
||||
/* treat integer literally */
|
||||
} else if (!preg_match('!^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$!', $token)) {
|
||||
/* treat as a string, double-quote it escaping quotes */
|
||||
$token = '"'.addslashes($token).'"';
|
||||
|
Reference in New Issue
Block a user