From 47870cd50c95ec0161e53dc5208aec035f05cbdc Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 24 Dec 2021 10:46:41 +0100 Subject: [PATCH] Various changes. --- app/Handlers/Events/UpdatedGroupEventHandler.php | 2 +- app/Jobs/MailError.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Handlers/Events/UpdatedGroupEventHandler.php b/app/Handlers/Events/UpdatedGroupEventHandler.php index 3d70db5d11..4c936e74b3 100644 --- a/app/Handlers/Events/UpdatedGroupEventHandler.php +++ b/app/Handlers/Events/UpdatedGroupEventHandler.php @@ -123,7 +123,7 @@ class UpdatedGroupEventHandler if (1 === $group->transactionJournals->count()) { return; } - Log::debug(sprintf('Correct inconsistent accounts in group #%d', $group->id)); + Log::debug(sprintf('Validating inconsistent accounts in group #%d', $group->id)); // first journal: /** @var TransactionJournal $first */ $first = $group->transactionJournals() diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 2c08727de5..e5657705fd 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -68,13 +68,13 @@ class MailError extends Job implements ShouldQueue */ public function handle() { - $email = config('firefly.site_owner'); + $email = (string) config('firefly.site_owner'); $args = $this->exception; $args['loggedIn'] = $this->userData['id'] > 0; $args['user'] = $this->userData; $args['ip'] = $this->ipAddress; $args['token'] = config('firefly.ipinfo_token'); - if ($this->attempts() < 3) { + if ($this->attempts() < 3 && strlen($email) > 0) { try { Mail::send( ['emails.error-html', 'emails.error-text'],