Skip to content

Commit

Permalink
Merge pull request #1890 from k-yamamura/bugfix-monolog-plugininstall
Browse files Browse the repository at this point in the history
ログ出力時に$app['user']のチェックを行う処理追加
  • Loading branch information
Yangsin authored Oct 27, 2016
2 parents 5dc55eb + ef7159e commit 6b78b0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Eccube/Log/Monolog/Helper/LogHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ public function getHandler(array $channelValues)
$record['session_id'] = substr(sha1($sessionId), 0, 8);
}
}
$user = $app->user();
if ($user instanceof Customer || $user instanceof Member) {
$record['user_id'] = $user->getId();
if (isset($app['user'])) {
$user = $app->user();
if ($user instanceof Customer || $user instanceof Member) {
$record['user_id'] = $user->getId();
}
}
}

Expand Down

0 comments on commit 6b78b0f

Please sign in to comment.