From c702b73558d6864191d6fb2daf13767cd1f09309 Mon Sep 17 00:00:00 2001 From: David GABISON Date: Thu, 23 Jan 2025 19:05:22 +0100 Subject: [PATCH] fix: PHP Warning: checkdate() expects parameter 1 to be int, string given --- src/Donations/Endpoints/Endpoint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Donations/Endpoints/Endpoint.php b/src/Donations/Endpoints/Endpoint.php index d64d5a5b44..a9c007bbab 100644 --- a/src/Donations/Endpoints/Endpoint.php +++ b/src/Donations/Endpoints/Endpoint.php @@ -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