From 80917018e901fbc3aa6dd87e6672e36a35acbebd Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 18 Nov 2019 19:09:21 +0100 Subject: [PATCH] Fix warnings --- src/Model/GServer.php | 4 ++-- src/Protocol/Feed.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/GServer.php b/src/Model/GServer.php index d759a24dff..074e1b6130 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -1061,7 +1061,7 @@ class GServer $attr = []; if ($node->attributes->length) { foreach ($node->attributes as $attribute) { - $attribute->value = trim($attribute->value); + $attribute->value = @trim($attribute->value); if (empty($attribute->value)) { continue; } @@ -1117,7 +1117,7 @@ class GServer $attr = []; if ($node->attributes->length) { foreach ($node->attributes as $attribute) { - $attribute->value = trim($attribute->value); + $attribute->value = @trim($attribute->value); if (empty($attribute->value)) { continue; } diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 0c9501387c..705a094c38 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -422,7 +422,7 @@ class Feed { $data = ParseUrl::getSiteinfoCached($item['plink'], true); if (!empty($data['text']) && !empty($data['title']) && (mb_strlen($item['body']) < mb_strlen($data['text']))) { // When the fetched page info text is longer than the body, we do try to enhance the body - if ((strpos($data['title'], $item['body']) === false) && (strpos($data['text'], $item['body']) === false)) { + if (!empty($item['body']) && (strpos($data['title'], $item['body']) === false) && (strpos($data['text'], $item['body']) === false)) { // The body is not part of the fetched page info title or page info text. So we add the text to the body $item['body'] .= "\n\n" . $data['text']; } else { -- 2.39.5