Skip to content

Commit c34d3c9

Browse files
committed
BUGFIX: Correctly handle dated in search output
1 parent 137a2f2 commit c34d3c9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Classes/Command/SearchCommandController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ private function outputResults(ElasticSearchQueryResult $result): void
128128
foreach ($node->getProperties() as $propertyName => $propertyValue) {
129129
if ($propertyValue instanceof ResourceBasedInterface) {
130130
$properties[$propertyName] = '<b>' . $propertyName . '</b>: ' . (string)$propertyValue->getResource()->getFilename();
131+
} elseif ($propertyValue instanceof \DateTime) {
132+
$properties[$propertyName] = '<b>' . $propertyName . '</b>: ' . $propertyValue->format('Y-m-d H:i');
131133
} else {
132134
$properties[$propertyName] = '<b>' . $propertyName . '</b>: ' . (string)$propertyValue;
133135
}

0 commit comments

Comments
 (0)