Skip to content

Commit

Permalink
fix: PHP Notice: Undefined offset: 1
Browse files Browse the repository at this point in the history
  • Loading branch information
David GABISON committed Jan 23, 2025
1 parent c98892f commit de0b22f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Donations/Endpoints/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function validateInt($value)
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);
$valid = checkdate($month, $day, $year);

Expand Down

0 comments on commit de0b22f

Please sign in to comment.