From 895afda81dfe05189c385ea2670f6c5ceca5d8b0 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 15 Apr 2024 15:22:27 +0200 Subject: [PATCH] v 0.5.2 - Fix time extraction format --- wpuerrorlogs.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpuerrorlogs.php b/wpuerrorlogs.php index bbf9032..2649bb2 100644 --- a/wpuerrorlogs.php +++ b/wpuerrorlogs.php @@ -4,7 +4,7 @@ Plugin URI: https://github.com/WordPressUtilities/wpuerrorlogs Update URI: https://github.com/WordPressUtilities/wpuerrorlogs Description: Make sense of your log files -Version: 0.5.1 +Version: 0.5.2 Author: Darklg Author URI: https://github.com/Darklg Text Domain: wpuerrorlogs @@ -21,7 +21,7 @@ } class WPUErrorLogs { - private $plugin_version = '0.5.1'; + private $plugin_version = '0.5.2'; private $plugin_settings = array( 'id' => 'wpuerrorlogs', 'name' => 'WPU Error Logs' @@ -222,7 +222,7 @@ function get_logs_from_file($file) { foreach ($lines as $line) { /* Is it a new error */ - if (substr($line, 0, 1) == '[' && preg_match('/^\[\d{2}-[A-Za-z]{3}-\d{4} \d{2}:\d{2}:\d{2} UTC\]/', $line, $matches)) { + if (substr($line, 0, 1) == '[' && preg_match('/^\[\d{2}-[A-Za-z]{3}-\d{4} \d{2}:\d{2}:\d{2} [A-Za-z\/]+\]/', $line, $matches)) { if (!empty($currentError)) { $currentError['text'] = $this->minimize_error_text($currentError['text']); $errors[] = $currentError;