summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-22 14:41:09 +0300
committerAndrew Dolgov <[email protected]>2021-02-22 14:41:09 +0300
commitbe4e7b13403666fc477d4b563ea8c075d0fd2022 (patch)
tree38eee4a6d7a5f0c4ecc3b37f997c385559c1d2a8 /classes/handler
parent043ef3dad68f774598e1b172ecb0f5ea75f112af (diff)
fix several issues reported by phpstan
Diffstat (limited to 'classes/handler')
-rwxr-xr-xclasses/handler/public.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index b0ce2306d..3910cf7c1 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -146,9 +146,9 @@ class Handler_Public extends Handler {
$tpl->addBlock('enclosure');
}
} else {
- $tpl->setVariable('ARTICLE_ENCLOSURE_URL', null, true);
- $tpl->setVariable('ARTICLE_ENCLOSURE_TYPE', null, true);
- $tpl->setVariable('ARTICLE_ENCLOSURE_LENGTH', null, true);
+ $tpl->setVariable('ARTICLE_ENCLOSURE_URL', "", true);
+ $tpl->setVariable('ARTICLE_ENCLOSURE_TYPE', "", true);
+ $tpl->setVariable('ARTICLE_ENCLOSURE_LENGTH', "", true);
}
list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $feed_site_url);
@@ -207,8 +207,8 @@ class Handler_Public extends Handler {
$article['content'] = Sanitizer::sanitize($line["content"], false, $owner_uid, $feed_site_url, false, $line["id"]);
$article['updated'] = date('c', strtotime($line["updated"]));
- if ($line['note']) $article['note'] = $line['note'];
- if ($article['author']) $article['author'] = $line['author'];
+ if (!empty($line['note'])) $article['note'] = $line['note'];
+ if (!empty($line['author'])) $article['author'] = $line['author'];
if (count($line["tags"]) > 0) {
$article['tags'] = array();