Permalink
Browse files

trivial optimization

  • Loading branch information...
1 parent 213e81b commit 1b22d48a3556ff4bb0b105aa3bb9d7169819d31e @ADmad ADmad committed Feb 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Log/Engine/FileLog.php
View
2 lib/Cake/Log/Engine/FileLog.php
@@ -59,7 +59,7 @@ public function __construct($config = array()) {
$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';
}
}

0 comments on commit 1b22d48

Please sign in to comment.