Skip to content

Commit

Permalink
fix: warning on top of dashboard page
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ribeiro committed Sep 1, 2024
1 parent db542f2 commit 25100ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$version = "v2.23.0";
$version = "v2.23.1";
?>
9 changes: 6 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
$sql = "SELECT * FROM subscriptions WHERE user_id = :userId ORDER BY next_payment ASC, inactive ASC";
}

$params = array();

if (isset($_COOKIE['sortOrder']) && $_COOKIE['sortOrder'] != "") {
$sort = $_COOKIE['sortOrder'] ?? 'next_payment';
$sortOrder = $sort;
Expand All @@ -28,7 +30,6 @@
$sort = "next_payment";
}

$params = array();
$sql = "SELECT * FROM subscriptions WHERE user_id = :userId";

if (isset($_GET['member'])) {
Expand Down Expand Up @@ -105,8 +106,10 @@
$stmt->bindValue(':userId', $userId, SQLITE3_INTEGER);


foreach ($params as $key => $value) {
$stmt->bindValue($key, $value, SQLITE3_INTEGER);
if (!empty($params)) {
foreach ($params as $key => $value) {
$stmt->bindValue($key, $value, SQLITE3_INTEGER);
}
}

$result = $stmt->execute();
Expand Down

0 comments on commit 25100ab

Please sign in to comment.