From de0b22f1ddca9994345e05b379e2dc187431b262 Mon Sep 17 00:00:00 2001 From: David GABISON Date: Thu, 23 Jan 2025 19:03:59 +0100 Subject: [PATCH] fix: PHP Notice: Undefined offset: 1 --- src/Donations/Endpoints/Endpoint.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Donations/Endpoints/Endpoint.php b/src/Donations/Endpoints/Endpoint.php index 826cbdee34..d64d5a5b44 100644 --- a/src/Donations/Endpoints/Endpoint.php +++ b/src/Donations/Endpoints/Endpoint.php @@ -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);