From b4195df628b910bb8e0dabf2a8851f390c0fe087 Mon Sep 17 00:00:00 2001 From: Jerome_maarch Date: Tue, 26 Mar 2019 17:08:06 +0100 Subject: [PATCH] fix wrong date display when null value --- .../maarchRM/Presenter/recordsManagement/archive.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/presentation/maarchRM/Presenter/recordsManagement/archive.php b/src/presentation/maarchRM/Presenter/recordsManagement/archive.php index c853a194a..1d4e4dfba 100755 --- a/src/presentation/maarchRM/Presenter/recordsManagement/archive.php +++ b/src/presentation/maarchRM/Presenter/recordsManagement/archive.php @@ -296,7 +296,7 @@ class archive /** * Returns the presenter for archive description object, or null * @param string $descriptionClass The name of the description class used by archive - * + * * @return object|null */ protected function getPresenter($descriptionClass) @@ -1100,9 +1100,11 @@ class archive } if ($type == "date") { - $dateObject = \laabs::newDate($value); - $textValue = $this->view->dateTimeFormatter->formatDate($dateObject); - + $textValue = ""; + if (!empty($value)) { + $dateObject = \laabs::newDate($value); + $textValue = $this->view->dateTimeFormatter->formatDate($dateObject); + } $valueNode = $this->view->createTextNode($textValue); } elseif ($type == 'boolean') { $valueNode = $this->view->createElement('i'); -- GitLab