Skip to content

Commit

Permalink
Bugfix for null user-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Aug 28, 2019
1 parent 5d67a3e commit 2810f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Visits.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function record()
// add session/server specifics
$visit->session_id = $this->session->session_id;
$visit->user_id = $this->session->{$this->config->userSource} ?? null;
$visit->user_agent = $_SERVER['HTTP_USER_AGENT'] ?? null;
$visit->user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
$visit->ip_address = $_SERVER['REMOTE_ADDR'] ?? null;

// check for an existing similar record
Expand Down

0 comments on commit 2810f7b

Please sign in to comment.