Skip to content

Commit 2810f7b

Browse files
committed
Bugfix for null user-agent
1 parent 5d67a3e commit 2810f7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Visits.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function record()
104104
// add session/server specifics
105105
$visit->session_id = $this->session->session_id;
106106
$visit->user_id = $this->session->{$this->config->userSource} ?? null;
107-
$visit->user_agent = $_SERVER['HTTP_USER_AGENT'] ?? null;
107+
$visit->user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
108108
$visit->ip_address = $_SERVER['REMOTE_ADDR'] ?? null;
109109

110110
// check for an existing similar record

0 commit comments

Comments
 (0)