Skip to content

Commit 8e11c05

Browse files
committed
Fix null latest release date
1 parent 122b153 commit 8e11c05

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Sherlock
22

3+
## 5.2.1 - Unreleased
4+
5+
- Fixed a bug in which an error could be thrown if the latest release of a plugin did not have an associated date ([#49](https://github.com/putyourlightson/craft-sherlock/issues/49)).
6+
37
## 5.2.0 - 2025-07-21
48

59
- Added basic auth username and password settings ([#48](https://github.com/putyourlightson/craft-sherlock/issues/48)).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "putyourlightson/craft-sherlock",
33
"description": "Security scanner and monitor to keep your site and CMS secure.",
4-
"version": "5.2.0",
4+
"version": "5.2.1",
55
"type": "craft-plugin",
66
"homepage": "https://putyourlightson.com/plugins/sherlock",
77
"license": "proprietary",

src/services/TestsService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,10 @@ private function getPathsWritableByEveryone(array $paths): array
739739
*/
740740
private function formatDate(DateTime|int|string|null $date): string
741741
{
742+
if ($date === null) {
743+
return '';
744+
}
745+
742746
return Craft::$app->getFormatter()->asDate($date, 'long');
743747
}
744748

0 commit comments

Comments
 (0)