Skip to content

Commit

Permalink
v 0.5.2
Browse files Browse the repository at this point in the history
- Fix time extraction format
  • Loading branch information
Darklg committed Apr 15, 2024
1 parent fd7b96a commit 895afda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wpuerrorlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 895afda

Please sign in to comment.