From 743151aabc1e5c94fd9dbff72a02fd708fcecf06 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 10 Feb 2023 20:43:45 +0100 Subject: [PATCH] Catch errors and log error, but continue running --- Blacklight/processing/post/ProcessAdditional.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 6d4855299..614874d83 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -885,6 +885,7 @@ class ProcessAdditional { $totalBookFiles = 0; foreach ($this->_nzbContents as $this->_currentNZBFile) { + try{ // Check if it's not a nfo, nzb, par2 etc... if (preg_match($this->_supportFileRegex.'|nfo\b|inf\b|ofn\b)($|[ ")\]-])(?!.{20,})/i', $this->_currentNZBFile['title'])) { @@ -947,6 +948,9 @@ class ProcessAdditional if (preg_match($this->_ignoreBookRegex, $this->_currentNZBFile['title'])) { $totalBookFiles++; } + } catch (\ErrorException $e) { + Log::debug($e->getTraceAsString()); + } } return $totalBookFiles;