mirror of
https://github.com/ZotPrime/zotprime.git
synced 2021-05-12 18:32:25 +03:00
Avoid notice in /keys request if no User-Agent
This commit is contained in:
@@ -35,7 +35,8 @@ class KeysController extends ApiController {
|
||||
if ($key == 'current') {
|
||||
$key = $this->apiKey;
|
||||
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Zotero/') !== false) {
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT'])
|
||||
&& strpos($_SERVER['HTTP_USER_AGENT'], 'Zotero/') !== false) {
|
||||
$syncStart = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user