Mail validation errors is now an object, and must be tested with ->count()
This commit is contained in:
parent
da7bfcc4e2
commit
903c19dbeb
@ -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;
|
||||
|
@ -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');
|
||||
});
|
||||
|
||||
|
@ -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');
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user