Skip to content

Commit 059c421

Browse files
author
fantu
committed
replace ereg how is deprecated in php 5.3 and removed in php 6
1 parent 829e84b commit 059c421

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interface/lib/classes/tpl.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ private function _parseVar ($wholetag, $tag, $varname, $escape, $format, $namesp
10951095

10961096
switch (strtolower($this->OPTIONS['UNKNOWNS'])) {
10971097
case 'comment':
1098-
$comment = addcslashes('<!-- unknown variable '.ereg_replace('<!--|-->', '', $wholetag).'//-->', '"');
1098+
$comment = addcslashes('<!-- unknown variable '.preg_replace('/<!--|-->/', '', $wholetag).'//-->', '"');
10991099
$retstr .= ' else { print("'.$comment.'"); $this->_setUnknown("'.$varname.'"); }';
11001100
return $retstr;
11011101

interface/lib/classes/tpl_cache.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function setCacheLifeTime($int = null) {
8282
* @return boolean
8383
*/
8484
function setCacheExtension($str = null) {
85-
if ($str == null || !ereg('^[a-z0-9]+$', strtolower($str))) return false;
85+
if ($str == null || !preg_match('/^[a-z0-9]+$/', strtolower($str))) return false;
8686
$this->OPTIONS['CACHE_EXTENSION'] = strtolower($str);
8787
return true;
8888
}

0 commit comments

Comments
 (0)