aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-13 21:07:45 +0200
committerGravatar GitHub <noreply@github.com> 2016-10-13 21:07:45 +0200
commitf41362a594ffaad726e0621c6eed8e62ae9b634c (patch)
treedc11bc29a019c31983feb5dabe23add7f50923e2
parent8ee61c1f788980f8fb862b4cfd75eba5e78a2547 (diff)
parent576f9737a8aab276e1571287c1b6ccb23d068b0a (diff)
Merge pull request #1308 from Alkarex/Minz-log-username-bug
Minz::Log bug when currentUser is empty string
-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) {