We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8d6700 commit 78cd774Copy full SHA for 78cd774
src/Utills/Detector.php
@@ -60,7 +60,7 @@ public function getBrowser(): string
60
return 'CLI';
61
}
62
63
- $userAgent = $_SERVER['HTTP_USER_AGENT'];
+ $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? null;
64
65
foreach ($this->browserName as $key => $browser) {
66
if (str_contains($userAgent, $key)) {
@@ -80,7 +80,7 @@ public function getDevice(): string
80
81
82
83
84
85
foreach ($this->deviceName as $pattern => $name) {
86
if (preg_match($pattern, $userAgent)) {
0 commit comments