aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Log.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Minz/Log.php')
-rw-r--r--lib/Minz/Log.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Minz/Log.php b/lib/Minz/Log.php
index 2a9e10993..9559a0bd4 100644
--- a/lib/Minz/Log.php
+++ b/lib/Minz/Log.php
@@ -42,7 +42,11 @@ class Minz_Log {
|| ($env === 'production'
&& ($level >= Minz_Log::NOTICE)))) {
if ($file_name === null) {
- $file_name = join_path(USERS_PATH, Minz_Session::param('currentUser', '_'), 'log.txt');
+ $username = Minz_Session::param('currentUser', '');
+ if ($username == '') {
+ $username = '_';
+ }
+ $file_name = join_path(USERS_PATH, $username, 'log.txt');
}
switch ($level) {