From 4d3d57fdcd74ac0c483e72662cc8bea331a411f4 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 4 Dec 2022 20:45:33 +1100 Subject: [PATCH] Fix EMSI session undefined, other minor cosmetic code changes --- app/Classes/Protocol/EMSI.php | 4 +++- app/Notifications/NetmailTest.php | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Classes/Protocol/EMSI.php b/app/Classes/Protocol/EMSI.php index 194ab72..2baf1e1 100644 --- a/app/Classes/Protocol/EMSI.php +++ b/app/Classes/Protocol/EMSI.php @@ -1173,6 +1173,8 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface { Log::debug(sprintf('%s:+ wazoosend [%d]',self::LOGKEY,$zap)); + $z = NULL; + // See if there is anything to add to the outbound // Add our mail to the queue if we have authenticated if ($this->node->aka_authed) @@ -1186,6 +1188,6 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface } Log::debug(sprintf('%s:- Finished sending',self::LOGKEY)); - return ($z->zmodem_senddone()<0); + return (($z && $z->zmodem_senddone())<0); } } \ No newline at end of file diff --git a/app/Notifications/NetmailTest.php b/app/Notifications/NetmailTest.php index e255c3c..f09ce6e 100644 --- a/app/Notifications/NetmailTest.php +++ b/app/Notifications/NetmailTest.php @@ -8,8 +8,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Log; -use App\Classes\{ANSI,Fonts\Thin,Page}; -use App\Classes\Fonts\Thick; +use App\Classes\{ANSI,Fonts\Thin,Fonts\Thick,Page}; use App\Classes\FTN\Message; use App\Models\{Address,Netmail,Setup,User};