aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/plugins/function.math.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/function.math.php')
-rw-r--r--vendor/smarty/smarty/libs/plugins/function.math.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/smarty/smarty/libs/plugins/function.math.php b/vendor/smarty/smarty/libs/plugins/function.math.php
index f9cf67fe7..8560e9441 100644
--- a/vendor/smarty/smarty/libs/plugins/function.math.php
+++ b/vendor/smarty/smarty/libs/plugins/function.math.php
@@ -70,7 +70,7 @@ function smarty_function_math($params, $template)
$number = '(?:\d+(?:[,.]\d+)?|pi|π)'; // What is a number
$functionsOrVars = '((?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))';
$operators = '[,+\/*\^%-]'; // Allowed math operators
- $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)*\)|\((?1)*\)))(?:'.$operators.'(?1))?)+$/';
+ $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)+\)|\((?1)+\)))(?:'.$operators.'(?1))?)+$/';
if (!preg_match($regexp, $equation)) {
trigger_error("math: illegal characters", E_USER_WARNING);