trivial optimization

This commit is contained in:
ADmad 2013-02-13 00:54:03 +05:30
parent 213e81bdbd
commit 1b22d48a35

View file

@ -59,7 +59,7 @@ class FileLog extends BaseLog {
$config = $this->config($config);
$this->_path = $config['path'];
$this->_file = $config['file'];
if (!empty($this->_file) && !preg_match('/\.log$/', $this->_file)) {
if (!empty($this->_file) && substr($this->_file, -4) !== '.log') {
$this->_file .= '.log';
}
}