summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorfox <[email protected]>2022-10-01 12:28:15 +0300
committerfox <[email protected]>2022-10-01 12:28:15 +0300
commit0ac143a29b45e35faf7b636e26d4aa854d95602a (patch)
tree8b28a34faaac9fd848dad7503db8d6c191f894f6 /classes/handler/public.php
parent42bc1620b8deda73b96b2e0029c6de79daa5ccca (diff)
parent560caf837768a39d7e13f067f9221347ad348774 (diff)
Merge pull request 'Fix PHP8 strtime warning if argument is null (addendum)' (#86) from mechnich/tt-rss:more-strtotime-fixes into master
Reviewed-on: https://dev.tt-rss.org/fox/tt-rss/pulls/86
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 5c2f2bd02..08b73b87d 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -128,9 +128,9 @@ class Handler_Public extends Handler {
$tpl->setVariable('ARTICLE_CONTENT', $content, true);
$tpl->setVariable('ARTICLE_UPDATED_ATOM',
- date('c', strtotime($line["updated"])), true);
+ date('c', strtotime($line["updated"] ?? '')), true);
$tpl->setVariable('ARTICLE_UPDATED_RFC822',
- date(DATE_RFC822, strtotime($line["updated"])), true);
+ date(DATE_RFC822, strtotime($line["updated"] ?? '')), true);
$tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), true);
@@ -214,7 +214,7 @@ class Handler_Public extends Handler {
$article['title'] = $line['title'];
$article['excerpt'] = $line["content_preview"];
$article['content'] = Sanitizer::sanitize($line["content"], false, $owner_uid, $feed_site_url, null, $line["id"]);
- $article['updated'] = date('c', strtotime($line["updated"]));
+ $article['updated'] = date('c', strtotime($line["updated"] ?? ''));
if (!empty($line['note'])) $article['note'] = $line['note'];
if (!empty($line['author'])) $article['author'] = $line['author'];