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
No related branches found
No related tags found
No related merge requests found
<?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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment