diff --git a/app/Console/Commands/TestWebklex.php b/app/Console/Commands/TestWebklex.php index 5fbadcd4..a8009b6d 100644 --- a/app/Console/Commands/TestWebklex.php +++ b/app/Console/Commands/TestWebklex.php @@ -78,7 +78,7 @@ class TestWebklex extends Command $client = \MailHelper::getMailboxClient($mailbox); $client->openFolder("INBOX"); - $message = Message::make($this->option('uid'), null, $client, $raw_header, $raw_body, [0 => "\\Seen"], IMAP::ST_UID); + $message = Message::make(/*$this->option('uid')*/null, null, $client, $raw_header, $raw_body, [/*0 => "\\Seen"*/], IMAP::ST_UID); $this->line('Headers: '); $this->info($message->getHeader()->raw); diff --git a/overrides/webklex/php-imap/src/Message.php b/overrides/webklex/php-imap/src/Message.php index 58c9d64c..b0db5763 100644 --- a/overrides/webklex/php-imap/src/Message.php +++ b/overrides/webklex/php-imap/src/Message.php @@ -246,7 +246,7 @@ class Message { * @throws Exceptions\RuntimeException * @throws Exceptions\MessageNotFoundException */ - public static function make(int $uid, $msglist, Client $client, string $raw_header, string $raw_body, array $raw_flags, $fetch_options = null, $sequence = null): Message { + public static function make(/*int*/ $uid, $msglist, Client $client, string $raw_header, string $raw_body, array $raw_flags, $fetch_options = null, $sequence = null): Message { $reflection = new ReflectionClass(self::class); /** @var self $instance */ $instance = $reflection->newInstanceWithoutConstructor(); @@ -265,7 +265,9 @@ class Message { $instance->setFetchOption($fetch_options); $instance->setClient($client); - $instance->setSequenceId($uid, $msglist); + if ($uid !== null) { + $instance->setSequenceId($uid, $msglist); + } $instance->parseRawHeader($raw_header); $instance->parseRawFlags($raw_flags);