From b96e42258389ad753ac067b3ff3f686722d17752 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Tue, 5 Sep 2023 10:18:20 -0600 Subject: [PATCH] Return empty string on zero dates. (#2494) --- src/Commands/StructuredListTrait.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Commands/StructuredListTrait.php b/src/Commands/StructuredListTrait.php index 5d5d1d239..c613a9f42 100644 --- a/src/Commands/StructuredListTrait.php +++ b/src/Commands/StructuredListTrait.php @@ -93,6 +93,9 @@ private function addDatetimeRenderer(AbstractStructuredList $list, array $date_a $list->addRendererFunction( function ($key, $cell_data) use ($config, $date_attributes) { if (!is_numeric($key) && in_array($key, $date_attributes)) { + if (empty($cell_data)) { + return '-'; + } return $config->formatDatetime($cell_data); } return $cell_data;