Skip to content

Commit fb7b2c5

Browse files
chore: convert the date object to json
Before this the output is: "last_signature":"2025-08-23 00:36:23", "current_date_time":"2025-08-23 00:36:24" Now is: "last_signature":"{\"date\":\"2025-08-23 01:35:36.000000\",\"timezone_type\":3,\"timezone\":\"UTC\"}", "current_date_time":"{\"date\":\"2025-08-23 01:35:47.270345\",\"timezone_type\":3,\"timezone\":\"UTC\"}" Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9297678 commit fb7b2c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Handler/SignEngine/SignEngineHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ public function getLastSignedDate(): \DateTime {
221221
// Prevent accepting certificates with future signing dates (possible clock issues)
222222
$dateTime = new \DateTime();
223223
if ($last['signingTime'] > $dateTime) {
224-
$this->logger->error('We found Marty McFly', ['last_signature' => $last['signingTime'], 'current_date_time' => $dateTime]);
224+
$this->logger->error('We found Marty McFly', [
225+
'last_signature' => json_encode($last['signingTime']),
226+
'current_date_time' => json_encode($dateTime),
227+
]);
225228
throw new \UnexpectedValueException('Invalid signingTime in certificate chain. We found Marty McFly');
226229
}
227230

0 commit comments

Comments
 (0)