summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe.Tews@googlemail.com <Uwe.Tews@googlemail.com>2014-02-05 19:39:21 +0000
committerUwe.Tews@googlemail.com <Uwe.Tews@googlemail.com>2014-02-05 19:39:21 +0000
commitf242ce30fb3ad728620aca22379c0aa1da7fdf3a (patch)
tree689fbba4b23d855ccaa3c35709f98e5b3c3d899b
parentba2996fef584162bb82b6699c9b2acdb8405840c (diff)
downloadsmarty-f242ce30fb3ad728620aca22379c0aa1da7fdf3a.tar.gz
smarty-f242ce30fb3ad728620aca22379c0aa1da7fdf3a.tar.bz2
smarty-f242ce30fb3ad728620aca22379c0aa1da7fdf3a.zip
- bugfix shared.literal_compiler_param.php did throw an exception when literal did contain a '-' (smarty-developers group)
-rw-r--r--change_log.txt3
-rw-r--r--libs/plugins/shared.literal_compiler_param.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/change_log.txt b/change_log.txt
index fe652892..684920c1 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -1,4 +1,7 @@
===== trunk =====
+ 05.02.2014
+ - bugfix shared.literal_compiler_param.php did throw an exception when literal did contain a '-' (smarty-developers group)
+
27.01.2014
- bugfix $smarty->debugging = true; did show the variable of the $smarty object not the variables used in display() call (forum topic 24764)
- bugfix clearCompiledTemplate(), clearAll() and clear() should use realpath to avoid possible exception from RecursiveDirectoryIterator (Issue 171)
diff --git a/libs/plugins/shared.literal_compiler_param.php b/libs/plugins/shared.literal_compiler_param.php
index 1420a0e2..f709f188 100644
--- a/libs/plugins/shared.literal_compiler_param.php
+++ b/libs/plugins/shared.literal_compiler_param.php
@@ -23,7 +23,7 @@ function smarty_literal_compiler_param($params, $index, $default=null)
return $default;
}
// test if param is a literal
- if (!preg_match('/^([\'"]?)[a-zA-Z0-9]+(\\1)$/', $params[$index])) {
+ if (!preg_match('/^([\'"]?)[a-zA-Z0-9-]+(\\1)$/', $params[$index])) {
throw new SmartyException('$param[' . $index . '] is not a literal and is thus not evaluatable at compile time');
}