From 5543587dcc1ed98d65448c4ac58aea2ec662ce16 Mon Sep 17 00:00:00 2001 From: sebschaefer Date: Thu, 21 Nov 2019 16:39:41 +0100 Subject: [PATCH 1/3] Fix: utility failure, if first file is not .log* Utility will filter only valid files for the $logFiles list --- src/Utility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utility.php b/src/Utility.php index 1566384..8220364 100644 --- a/src/Utility.php +++ b/src/Utility.php @@ -34,7 +34,7 @@ public static function contentHtml (): string $logFiles = array_values(array_filter( scandir($logsDir), function ($var) { - return $var[0] != '.'; + return $var[0] != '.' && strpos($var, '.log'); } )); From 7ec115cfc6f0a1a35396be3c49da4a118632c9ad Mon Sep 17 00:00:00 2001 From: Tam Date: Mon, 25 Nov 2019 16:57:31 +0000 Subject: [PATCH 2/3] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3897dbe..3cfe0b2 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ether/logs", "description": "Access logs from the CP", - "version": "3.0.2", + "version": "3.0.3", "type": "craft-plugin", "minimum-stability": "dev", "require": { @@ -24,4 +24,4 @@ "class": "ether\\logs\\Logs", "schemaVersion": "3.0.0" } -} \ No newline at end of file +} From 2ef516e7e0000e1efb69a6b7720f94baebdb1382 Mon Sep 17 00:00:00 2001 From: Tam Date: Mon, 25 Nov 2019 16:58:39 +0000 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17807cc..2389d4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.3 - 2019-11-25 +### Fixed +- Fix error when first file is not `*.log` (via [@sebschaefer](https://github.com/sebschaefer)) + ## 3.0.2 - 2019-10-24 ### Fixed - Fix issue with missing log variable in compact() call (via [@jeffturcotte](https://github.com/jeffturcotte)) @@ -7,4 +11,4 @@ - Fix security issue allowing a user to view any file on the system #2 ## 3.0.0 - 2017-12-01 -Initial Release \ No newline at end of file +Initial Release