Skip to content

Commit

Permalink
Merge pull request #27 from atk4/fix/logging-under-cli
Browse files Browse the repository at this point in the history
Fix problem with using audit log under cli
  • Loading branch information
DarkSide666 authored Oct 1, 2019
2 parents f2b6870 + f6d0b09 commit ac67e94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ docs/build
/build
/vendor
.DS_Store
/.idea
4 changes: 1 addition & 3 deletions src/model/AuditLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ public function loadLast()
*/
public function getUserInfo()
{
return [
'ip' => $_SERVER['REMOTE_ADDR']
];
return isset($_SERVER['REMOTE_ADDR']) ? ['ip' => $_SERVER['REMOTE_ADDR']] : [];
}

/**
Expand Down

0 comments on commit ac67e94

Please sign in to comment.