Skip to content

Commit

Permalink
Mailbox::addMessage: consume $internalDate even when $options is null (
Browse files Browse the repository at this point in the history
…ddeboer#499)

* fix: can use the internalDate when options is NULL

* fix: Add PHP 7.4 support

* CS Fix

Co-authored-by: Filippo Tessarotto <[email protected]>
  • Loading branch information
arnolem and Slamdunk authored Apr 27, 2021
1 parent 085aae9 commit 0e7d338
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,10 @@ public function addMessage(string $message, string $options = null, DateTimeInte
$this->resource->getStream(),
$this->getFullEncodedName(),
$message,
$options ?? '',
];
if (null !== $options) {
$arguments[] = $options;
if (null !== $internalDate) {
$arguments[] = $internalDate->format('d-M-Y H:i:s O');
}
if (null !== $internalDate) {
$arguments[] = $internalDate->format('d-M-Y H:i:s O');
}

return \imap_append(...$arguments);
Expand Down

0 comments on commit 0e7d338

Please sign in to comment.