From 00dc2c32daf6754cc5f4d1aeef4490d9a35cd04b Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Thu, 27 Sep 2012 00:47:44 -0400 Subject: [PATCH] Correct class name Improve variable's preg_match_all (Thanks to Jared) --- include/class.variable.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class.variable.php b/include/class.variable.php index 1fbb338ca..fa16f2244 100644 --- a/include/class.variable.php +++ b/include/class.variable.php @@ -1,10 +1,10 @@ <?php /********************************************************************* - class.filter.php + class.variable.php Variable replacer - Used to resolve and replace variables. + Used to parse, resolve and replace variables. Peter Rotich <peter@osticket.com> Copyright (c) 2006-2012 osTicket @@ -119,7 +119,7 @@ class VariableReplacer { function _parse($text) { $input = $text; - if(!preg_match_all('/'.$this->start_delim.'([A-Za-z\._]+)'.$this->end_delim.'/', $input, $result)) + if(!preg_match_all('/'.$this->start_delim.'([A-Za-z_][\w._]+)'.$this->end_delim.'/', $input, $result)) return null; $vars = array(); -- GitLab