summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-08 09:41:14 +0300
committerAndrew Dolgov <[email protected]>2021-02-08 09:41:14 +0300
commitaa0de81680f2558c1ce38a456ad0a5beb2934240 (patch)
treee374d23c370a94db2f6f7973977e607f0067477c
parent4f136b4a902adb2630e877b1ed83dcd1fbedc8ff (diff)
fix uid warning
-rw-r--r--init.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.php b/init.php
index d8137af..93c3e28 100644
--- a/init.php
+++ b/init.php
@@ -15,7 +15,7 @@ class UI_Gravatar extends Plugin {
$this->host = $host;
$sth = $this->pdo->prepare("SELECT email FROM ttrss_users WHERE id = ?");
- $sth->execute([$_SESSION['uid']]);
+ $sth->execute([($_SESSION['uid'] ?? 0)]);
if ($row = $sth->fetch()) {
$this->gravatar_hash = md5(trim($row['email']));