mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +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)
|
- $length is now propagated to sub-values in debug_print_var (messju)
|
||||||
|
|
||||||
Version 2.5.0-RC2 (March 26, 2003)
|
Version 2.5.0-RC2 (March 26, 2003)
|
||||||
|
@@ -1354,6 +1354,8 @@ class Smarty_Compiler extends Smarty {
|
|||||||
$token = 'false';
|
$token = 'false';
|
||||||
} else if ($token == 'null') {
|
} else if ($token == 'null') {
|
||||||
$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)) {
|
} else if (!preg_match('!^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$!', $token)) {
|
||||||
/* treat as a string, double-quote it escaping quotes */
|
/* treat as a string, double-quote it escaping quotes */
|
||||||
$token = '"'.addslashes($token).'"';
|
$token = '"'.addslashes($token).'"';
|
||||||
|
Reference in New Issue
Block a user