Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
a3bf845851 Merge pull request #11051 from firefly-iii/release-1760189013
🤖 Automatically merge the PR into the develop branch.
2025-10-11 15:23:39 +02:00
JC5
78e832cdba 🤖 Auto commit for release 'develop' on 2025-10-11 2025-10-11 15:23:33 +02:00
James Cole
d47e4c4f24 Fix #11050 2025-10-11 15:17:51 +02:00
3 changed files with 7 additions and 2 deletions

View File

@@ -40,6 +40,10 @@ class DateRangeRequest extends ApiRequest
$validator->after(
function (Validator $validator): void {
if (!$validator->valid()) {
// set null values
$this->attributes->set('start', null);
$this->attributes->set('end', null);
return;
}
$start = $this->getCarbonDate('start')?->startOfDay();

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests;
use Carbon\Carbon;
use Illuminate\Validation\Validator;
class DateRequest extends ApiRequest
@@ -47,7 +48,7 @@ class DateRequest extends ApiRequest
// if we also have a range, date must be in that range
$start = $this->attributes->get('start');
$end = $this->attributes->get('end');
if ($date && $start && $end && !$date->between($start, $end)) {
if ($date instanceof Carbon && $start instanceof Carbon && $end instanceof Carbon && !$date->between($start, $end)) {
$validator->errors()->add('date', (string)trans('validation.between_date'));
}

View File

@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-10-11',
'build_time' => 1760159380,
'build_time' => 1760188898,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.