Partially revert PR #2190
The core shouldn't depend on constants that are not defined by itself
diff --git a/system/core/Log.php b/system/core/Log.php
index 707964c..a949c3f 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -108,7 +108,7 @@
$this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
? ltrim($config['log_file_extension'], '.') : 'php';
- file_exists($this->_log_path) OR mkdir($this->_log_path, DIR_WRITE_MODE, TRUE);
+ file_exists($this->_log_path) OR mkdir($this->_log_path, 0777, TRUE);
if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path))
{
@@ -170,7 +170,7 @@
}
}
- if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
+ if ( ! $fp = @fopen($filepath, 'ab'))
{
return FALSE;
}
@@ -192,7 +192,7 @@
if (isset($newfile) && $newfile === TRUE)
{
- @chmod($filepath, FILE_WRITE_MODE);
+ @chmod($filepath, 0666);
}
return is_int($result);