replace ereg how is deprecated in php 5.3 and removed in php 6
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | * @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;
|
| | | }
|