From 3f81aa74036d6ab28692f4f0bd5ffd06847584ba Mon Sep 17 00:00:00 2001 From: Sander Dorigo Date: Thu, 2 Oct 2025 10:15:18 +0200 Subject: [PATCH] Fix #10988 --- app/Api/V1/Requests/Data/DateRequest.php | 10 ++++++++++ changelog.md | 1 + 2 files changed, 11 insertions(+) diff --git a/app/Api/V1/Requests/Data/DateRequest.php b/app/Api/V1/Requests/Data/DateRequest.php index 7ba1861086..05125a8868 100644 --- a/app/Api/V1/Requests/Data/DateRequest.php +++ b/app/Api/V1/Requests/Data/DateRequest.php @@ -46,6 +46,16 @@ class DateRequest extends FormRequest { $start = $this->getCarbonDate('start'); $end = $this->getCarbonDate('end'); + if(null === $start) { + $start = now()->startOfMonth(); + } + if(null === $end) { + $end = now()->endOfMonth(); + } + // sanity check on dates: + [$start, $end] = $end < $start ? [$end, $start] : [$start, $end]; + + $start->startOfDay(); $end->endOfDay(); if ($start->diffInYears($end, true) > 5) { diff --git a/changelog.md b/changelog.md index a165d12d9b..1c9594c475 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - [Issue 10956](https://github.com/firefly-iii/firefly-iii/issues/10956) (Manual webhook trigger fail) reported by @dudu7731 - [Issue 10960](https://github.com/firefly-iii/firefly-iii/issues/10960) (404 after deleting subscription) reported by @lindely - [Discussion 10974](https://github.com/orgs/firefly-iii/discussions/10974) (Big webhook_messages table) started by @Billos +- #10988 - [Issue 10990](https://github.com/firefly-iii/firefly-iii/issues/10990) (duplicate piggy event via API) reported by @4e868df3 ### API