Skip to content

Commit

Permalink
fix: use first currency on the list of currencies if user has not sel…
Browse files Browse the repository at this point in the history
…ected a main currency
  • Loading branch information
Miguel Ribeiro committed Feb 5, 2025
1 parent c2b95dc commit 48a07e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/list_subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ class="name"><?php include $imagePath . "images/siteicons/svg/subscription.php";
$stmt->bindValue(':userId', $userId, SQLITE3_INTEGER);
$result = $stmt->execute();
$row = $result->fetchArray(SQLITE3_ASSOC);
$mainCurrencyId = $row['main_currency'];
if ($row !== false) {
$mainCurrencyId = $row['main_currency'];
} else {
$mainCurrencyId = $currencies[1]['id'];
}

?>

0 comments on commit 48a07e9

Please sign in to comment.