make sure HTTP_DNT is set before inspecting it

This commit is contained in:
Andy Miller
2019-01-25 16:49:23 -07:00
parent 9058e1166d
commit 7c99ece0e1

View File

@@ -143,7 +143,7 @@ class Browser
*/
public function isTrackable(): bool
{
if ($_SERVER['HTTP_DNT'] === '1') {
if (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] === '1') {
return false;
}