Skip to content

Commit

Permalink
ログ出力時に$app['user']のチェックを行う処理追加
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yamamura committed Oct 27, 2016
1 parent bc1f947 commit ef7159e
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 ef7159e

Please sign in to comment.