From 945a55caad16d8021eb2dd21be5485ecef4cccf7 Mon Sep 17 00:00:00 2001 From: Alexander Blanchard Date: Thu, 24 Oct 2024 10:12:56 +0100 Subject: [PATCH] fix: Prevent error if no past campaigns are present --- code/web/sys/Community/Campaign.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/web/sys/Community/Campaign.php b/code/web/sys/Community/Campaign.php index d752dcb65c..a04e5447bb 100644 --- a/code/web/sys/Community/Campaign.php +++ b/code/web/sys/Community/Campaign.php @@ -340,7 +340,7 @@ public function getPastCampaigns(int $userId): array { $currentDate = date('Y-m-d H:i:s'); $campaign->whereAdd("endDate < '$currentDate'"); - $campaignList = []; + $pastCampaignList = []; if ($campaign->find()) { while($campaign->fetch()) {