Commit 059c4216 authored by fantu's avatar fantu
Browse files

replace ereg how is deprecated in php 5.3 and removed in php 6

parent 829e84b5
......@@ -1095,7 +1095,7 @@ if (!defined('vlibTemplateClassLoaded')) {
switch (strtolower($this->OPTIONS['UNKNOWNS'])) {
case 'comment':
$comment = addcslashes('<!-- unknown variable '.ereg_replace('<!--|-->', '', $wholetag).'//-->', '"');
$comment = addcslashes('<!-- unknown variable '.preg_replace('/<!--|-->/', '', $wholetag).'//-->', '"');
$retstr .= ' else { print("'.$comment.'"); $this->_setUnknown("'.$varname.'"); }';
return $retstr;
......
......@@ -82,7 +82,7 @@ class tplc extends tpl {
* @return boolean
*/
function setCacheExtension($str = null) {
if ($str == null || !ereg('^[a-z0-9]+$', strtolower($str))) return false;
if ($str == null || !preg_match('/^[a-z0-9]+$/', strtolower($str))) return false;
$this->OPTIONS['CACHE_EXTENSION'] = strtolower($str);
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment