From 1b22d48a3556ff4bb0b105aa3bb9d7169819d31e Mon Sep 17 00:00:00 2001 From: ADmad Date: Wed, 13 Feb 2013 00:54:03 +0530 Subject: [PATCH] trivial optimization --- lib/Cake/Log/Engine/FileLog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Log/Engine/FileLog.php b/lib/Cake/Log/Engine/FileLog.php index 904e831f2..d4c5d9a32 100644 --- a/lib/Cake/Log/Engine/FileLog.php +++ b/lib/Cake/Log/Engine/FileLog.php @@ -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'; } }