Update BillUpdateService.php

Catch nullpointers

Signed-off-by: James Cole <james@firefly-iii.org>
This commit is contained in:
James Cole 2024-11-08 09:30:24 +01:00 committed by GitHub
parent deb58e617d
commit 068094caac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,11 +159,11 @@ class BillUpdateService
}
if (array_key_exists('end_date', $data)) {
$bill->end_date = $data['end_date'];
$bill->end_date_tz = $data['end_date']->format('e');
$bill->end_date_tz = $data['end_date']?->format('e');
}
if (array_key_exists('extension_date', $data)) {
$bill->extension_date = $data['extension_date'];
$bill->extension_date_tz = $data['extension_date']->format('e');
$bill->extension_date_tz = $data['extension_date']?->format('e');
}
$bill->match = 'EMPTY';