summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKovács András <elcsiga@gmail.com>2017-01-15 22:23:24 +0100
committerGitHub <noreply@github.com>2017-01-15 22:23:24 +0100
commita9c354436538da2482b96e4f540e9bc69435e120 (patch)
tree1083cda45ff965acef9f966effc446f13b12177a
parent7cb9325e79057495d8b0a7f8eb5fe090dbf2e7c9 (diff)
downloadPHPAuth-a9c354436538da2482b96e4f540e9bc69435e120.zip
PHPAuth-a9c354436538da2482b96e4f540e9bc69435e120.tar.gz
PHPAuth-a9c354436538da2482b96e4f540e9bc69435e120.tar.bz2
HTTP_USER_AGENT is optional
-rw-r--r--Auth.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Auth.php b/Auth.php
index 07b48d1..98df9a8 100644
--- a/Auth.php
+++ b/Auth.php
@@ -378,7 +378,7 @@ class Auth
}
$data['hash'] = sha1($this->config->site_key . microtime());
- $agent = $_SERVER['HTTP_USER_AGENT'];
+ $agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$this->deleteExistingSessions($uid);