diff --git a/.gitignore b/.gitignore index 565dc19..f84fa08 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ docs/build /build /vendor .DS_Store +/.idea diff --git a/src/model/AuditLog.php b/src/model/AuditLog.php index 970ddbc..28be755 100644 --- a/src/model/AuditLog.php +++ b/src/model/AuditLog.php @@ -67,9 +67,7 @@ public function loadLast() */ public function getUserInfo() { - return [ - 'ip' => $_SERVER['REMOTE_ADDR'] - ]; + return isset($_SERVER['REMOTE_ADDR']) ? ['ip' => $_SERVER['REMOTE_ADDR']] : []; } /**