Fix errors must not be accessed before initialization

This commit is contained in:
Deon George 2021-08-08 22:49:38 +10:00
parent 72fb8044f9
commit 7922bc6a7a
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class Message extends FTNBase
private const SUBJECT_LEN = 71; // FTS-0001.016 Subject: upto 72 chars null terminated
private const AREATAG_LEN = 35; //
private ?ValidatorResult $errors; // Packet validation
private ?ValidatorResult $errors = NULL; // Packet validation
private array $header; // Message Header
private Collection $kludge; // Hold kludge items

View File

@ -50,7 +50,7 @@ final class Ping extends Process
$o->tzoffset = $o->datetime->utcOffset();
$o->reply = $msg->msgid;
$o->fftn_id = $ftns->id;
$o->fftn_id = $ftns->first()->id;
$o->tftn_id = ($x=$msg->fftn_o) ? $x->id : NULL;
$o->flags = Message::FLAG_LOCAL;
$o->cost = 0;