Skip to content
Snippets Groups Projects
Commit 00dc2c32 authored by Peter Rotich's avatar Peter Rotich
Browse files

Correct class name

Improve variable's preg_match_all (Thanks to Jared)
parent 6c74a8a6
Branches
Tags
No related merge requests found
<?php <?php
/********************************************************************* /*********************************************************************
class.filter.php class.variable.php
Variable replacer Variable replacer
Used to resolve and replace variables. Used to parse, resolve and replace variables.
Peter Rotich <peter@osticket.com> Peter Rotich <peter@osticket.com>
Copyright (c) 2006-2012 osTicket Copyright (c) 2006-2012 osTicket
...@@ -119,7 +119,7 @@ class VariableReplacer { ...@@ -119,7 +119,7 @@ class VariableReplacer {
function _parse($text) { function _parse($text) {
$input = $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; return null;
$vars = array(); $vars = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment