Skip to content

A free, self-hostable news aggregator…

Remove unneeded quotes in warning (#5480)

Alexandre Alapetitede59076ae1e1
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index a27259978..9b9910bff 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -400,8 +400,13 @@ class FreshRSS_Feed extends Minz_Model {
if ((!$mtime) || $simplePie->error()) {
$errorMessage = $simplePie->error();
+ if (empty($errorMessage)) {
+ $errorMessage = '';
+ } elseif (is_array($errorMessage)) {
+ $errorMessage = json_encode($errorMessage, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS) ?: '';
+ }
throw new FreshRSS_Feed_Exception(
- ($errorMessage == '' ? 'Unknown error for feed' : json_encode($errorMessage, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)) .
+ ($errorMessage == '' ? 'Unknown error for feed' : $errorMessage) .
' [' . $this->url . ']',
$simplePie->status_code()
);