Mail validation errors is now an object, and must be tested with ->count()

This commit is contained in:
2024-05-21 22:10:52 +10:00
parent 17e3c69f07
commit 18f5354d0c
3 changed files with 3 additions and 3 deletions

View File

@@ -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');
});