Release 2.36.0 (#5514)

This commit is contained in:
Kevin Papst
2025-06-02 16:07:48 +02:00
committed by GitHub
parent 594385f741
commit 2f2ebd6293
27 changed files with 466 additions and 257 deletions

View File

@@ -59,8 +59,7 @@ class TimesheetEditForm extends AbstractType
$timezone = $options['timezone'];
$isNew = true;
if (isset($options['data'])) {
/** @var Timesheet $entry */
if (isset($options['data']) && $options['data'] instanceof Timesheet) {
$entry = $options['data'];
$activity = $entry->getActivity();
@@ -338,7 +337,7 @@ class TimesheetEditForm extends AbstractType
function (FormEvent $event) {
/** @var Timesheet|null $timesheet */
$timesheet = $event->getData();
if (null === $timesheet || $timesheet->isRunning()) {
if (null === $timesheet || ($timesheet instanceof Timesheet && $timesheet->isRunning())) {
$event->getForm()->get('duration')->setData(null);
}
}