name=123 is passed as an integer (not a string) to plugins now

This commit is contained in:
messju
2003-04-03 17:00:17 +00:00
parent a769959582
commit b4a27fafa4
2 changed files with 3 additions and 0 deletions

1
NEWS
View File

@@ -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)

View File

@@ -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).'"';