Skip to content

Commit

Permalink
fix: Prevent error if no past campaigns are present
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBlanchardAC committed Oct 24, 2024
1 parent 51d8fab commit a1b6d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/web/sys/Community/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit a1b6d58

Please sign in to comment.