Skip to content

Commit

Permalink
Fix problem with using audit log under cli
Browse files Browse the repository at this point in the history
  • Loading branch information
skondakov committed Oct 1, 2019
1 parent f2b6870 commit f6d0b09
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 f6d0b09

Please sign in to comment.