diff --git a/app/Jobs/PacketProcess.php b/app/Jobs/PacketProcess.php index af6059b..27f214a 100644 --- a/app/Jobs/PacketProcess.php +++ b/app/Jobs/PacketProcess.php @@ -88,7 +88,7 @@ class PacketProcess implements ShouldQueue // Check the packet is to our address, if not we'll reject it. if (! our_address($this->do)->contains($pkt->tftn)) { - Log::error(sprintf('%s:! Packet [%s] is not to our address? [%s]',self::LOGKEY,$this->filename,$pkt->tftn)); + Log::error(sprintf('%s:! Packet [%s] is not to our address? [%s]',self::LOGKEY,$this->filename,$pkt->tftn->ftn)); // @todo Notification::route('netmail',$pkt->fftn)->notify(new UnexpectedPacketToUs($this->filename)); break; diff --git a/app/Models/Echomail.php b/app/Models/Echomail.php index d3b9a60..bde9025 100644 --- a/app/Models/Echomail.php +++ b/app/Models/Echomail.php @@ -92,7 +92,7 @@ final class Echomail extends Model implements Packet parent::boot(); static::creating(function($model) { - if (! is_null($model->errors)) + if ($model->errors->count()) throw new \Exception('Cannot save, validation errors exist'); }); diff --git a/app/Models/Netmail.php b/app/Models/Netmail.php index a06f83a..1aa1067 100644 --- a/app/Models/Netmail.php +++ b/app/Models/Netmail.php @@ -86,7 +86,7 @@ final class Netmail extends Model implements Packet parent::boot(); static::creating(function($model) { - if (! is_null($model->errors)) + if ($model->errors->count()) throw new \Exception('Cannot save, validation errors exist'); });