summaryrefslogtreecommitdiffstats
path: root/system/core/Log.php
diff options
context:
space:
mode:
authorChris Passas <cpassas@gmail.com>2013-02-14 15:01:24 +0100
committerChris Passas <cpassas@gmail.com>2013-02-14 15:01:24 +0100
commitfb8de247990189721bc7b2e48fe57ceb2db039f5 (patch)
tree539011d5cf60de71002ec2d38bb24d3f4a458462 /system/core/Log.php
parent2718f6c8a5bbae38b7a7f875c6eef40739ce8ee4 (diff)
Update system/core/Log.php
Don't print no script access code into log file if log file is not .php anymore.
Diffstat (limited to 'system/core/Log.php')
-rw-r--r--system/core/Log.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/core/Log.php b/system/core/Log.php
index abc7b2494..7b2082a6c 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -162,7 +162,10 @@ class CI_Log {
if ( ! file_exists($filepath))
{
$newfile = TRUE;
- $message .= '<'."?php defined('BASEPATH') OR exit('No direct script access allowed'); ?".">\n\n";
+ if($this->_log_ext === 'php')
+ {
+ $message .= '<'."?php defined('BASEPATH') OR exit('No direct script access allowed'); ?".">\n\n";
+ }
}
if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))