diff options
author | Jeroen van der Gulik <jeroen@isset.nl> | 2011-12-04 14:19:38 +0100 |
---|---|---|
committer | Jeroen van der Gulik <jeroen@isset.nl> | 2011-12-04 14:19:38 +0100 |
commit | 2835e08ac46ab5c260978a2013ba8837222318c5 (patch) | |
tree | 34f0888a5ef39aefe7b2b5c3dc89e7841a271760 /system/libraries | |
parent | bce4140f05f9e8642554eac7aee232023b9a93d9 (diff) |
- Stop logger from trying to chmod on each event to safe i/o and prevent error messages popping up when the user is different then the webserver
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Log.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Log.php b/system/libraries/Log.php index 6ea905f73..46c5b6ed2 100644 --- a/system/libraries/Log.php +++ b/system/libraries/Log.php @@ -111,6 +111,7 @@ class CI_Log { if ( ! file_exists($filepath)) { + $newfile = TRUE; $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n"; } @@ -126,7 +127,10 @@ class CI_Log { flock($fp, LOCK_UN); fclose($fp); - @chmod($filepath, FILE_WRITE_MODE); + if (isset($newfile) AND $newfile === TRUE) + { + @chmod($filepath, FILE_WRITE_MODE); + } return TRUE; } @@ -134,4 +138,4 @@ class CI_Log { // END Log Class /* End of file Log.php */ -/* Location: ./system/libraries/Log.php */
\ No newline at end of file +/* Location: ./system/libraries/Log.php */ |