Skip to content

Commit

Permalink
fix: PHP Warning: checkdate() expects parameter 1 to be int, string g…
Browse files Browse the repository at this point in the history
…iven
  • Loading branch information
David GABISON committed Jan 23, 2025
1 parent de0b22f commit c702b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Donations/Endpoints/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function validateDate($param, $request, $key)
{
// Check that date is valid, and formatted YYYY-MM-DD
if (substr_count($param, '-') !== 2) return false;
list($year, $month, $day) = explode('-', $param);
list($year, $month, $day) = array_map('intval', explode('-', $param));
$valid = checkdate($month, $day, $year);

// If checking end date, check that it is after start date
Expand Down

0 comments on commit c702b73

Please sign in to comment.