summaryrefslogtreecommitdiff
path: root/classes/digest.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/digest.php')
-rw-r--r--classes/digest.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/classes/digest.php b/classes/digest.php
index 15203166b..b19c37c5f 100644
--- a/classes/digest.php
+++ b/classes/digest.php
@@ -22,7 +22,7 @@ class Digest
while ($line = $res->fetch()) {
if (get_pref(Prefs::DIGEST_ENABLE, $line['id'])) {
- $preferred_ts = strtotime(get_pref(Prefs::DIGEST_PREFERRED_TIME, $line['id']));
+ $preferred_ts = strtotime(get_pref(Prefs::DIGEST_PREFERRED_TIME, $line['id']) ?? '');
// try to send digests within 2 hours of preferred time
if ($preferred_ts && time() >= $preferred_ts &&
@@ -98,11 +98,11 @@ class Digest
$tpl->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
$tpl->setVariable('CUR_TIME', date('G:i', $local_ts));
- $tpl->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
+ $tpl->setVariable('TTRSS_HOST', Config::get_self_url());
$tpl_t->setVariable('CUR_DATE', date('Y/m/d', $local_ts));
$tpl_t->setVariable('CUR_TIME', date('G:i', $local_ts));
- $tpl_t->setVariable('TTRSS_HOST', Config::get(Config::SELF_URL_PATH));
+ $tpl_t->setVariable('TTRSS_HOST', Config::get_self_url());
$affected_ids = array();
@@ -163,9 +163,7 @@ class Digest
$article_labels_formatted = "";
if (is_array($article_labels) && count($article_labels) > 0) {
- $article_labels_formatted = implode(", ", array_map(function($a) {
- return $a[1];
- }, $article_labels));
+ $article_labels_formatted = implode(", ", array_map(fn($a) => $a[1], $article_labels));
}
$tpl->setVariable('FEED_TITLE', $line["feed_title"]);