From 9215b95779ff2f0bd8a74d7213f3bfa09e452088 Mon Sep 17 00:00:00 2001 From: Dag Date: Wed, 7 Aug 2024 18:56:27 +0200 Subject: [PATCH] fix: bug in prior refactor (#4197) --- actions/DisplayAction.php | 2 +- lib/FeedItem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/DisplayAction.php b/actions/DisplayAction.php index aee47483..c51bb7cd 100644 --- a/actions/DisplayAction.php +++ b/actions/DisplayAction.php @@ -145,7 +145,7 @@ class DisplayAction implements ActionInterface if ($errorCount >= $reportLimit) { if ($errorOutput === 'feed') { // Render the exception as a feed item - $items[] = $this->createFeedItemFromException($e, $bridge); + $items = [$this->createFeedItemFromException($e, $bridge)]; } elseif ($errorOutput === 'http') { return new Response(render(__DIR__ . '/../templates/exception.html.php', ['e' => $e]), 500); } elseif ($errorOutput === 'none') { diff --git a/lib/FeedItem.php b/lib/FeedItem.php index 09aab129..8a092a27 100644 --- a/lib/FeedItem.php +++ b/lib/FeedItem.php @@ -136,7 +136,7 @@ class FeedItem { $this->title = null; if (!is_string($title)) { - Debug::log('Title must be a string!'); + trigger_error('Title must be a string: ' . print_r($title, true)); } else { $this->title = truncate(trim($title)); }