fantu
2008-12-22 059c4216d00218e7e2cb1f33b6f8b809a7db9917
replace ereg how is deprecated in php 5.3 and removed in php 6
2 files modified
4 ■■■■ changed files
interface/lib/classes/tpl.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tpl_cache.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tpl.inc.php
@@ -1095,7 +1095,7 @@
            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;
interface/lib/classes/tpl_cache.inc.php
@@ -82,7 +82,7 @@
     * @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;
    }