Skip to content

Commit 29a2a73

Browse files
committed
Exception for invalid message dates added
1 parent 4373812 commit 29a2a73

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/*
3+
* File: InvalidMessageDateException.php
4+
* Category: Exception
5+
* Author: M. Goldenbaum
6+
* Created: 10.03.19 04:31
7+
* Updated: -
8+
*
9+
* Description:
10+
* -
11+
*/
12+
13+
namespace Webklex\IMAP\Exceptions;
14+
15+
use \Exception;
16+
17+
/**
18+
* Class InvalidMessageDateException
19+
*
20+
* @package Webklex\IMAP\Exceptions
21+
*/
22+
class InvalidMessageDateException extends Exception {
23+
24+
}

src/IMAP/Message.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Webklex\IMAP;
1414

1515
use Carbon\Carbon;
16+
use Webklex\IMAP\Exceptions\InvalidMessageDateException;
1617
use Webklex\IMAP\Support\AttachmentCollection;
1718
use Webklex\IMAP\Support\FlagCollection;
1819

@@ -286,6 +287,7 @@ public function getHTMLBody($replaceImages = false) {
286287
*
287288
* @return void
288289
* @throws Exceptions\ConnectionFailedException
290+
* @throws InvalidMessageDateException
289291
*/
290292
private function parseHeader() {
291293
$this->header = $header = imap_fetchheader($this->client->getConnection(), $this->uid, FT_UID);

0 commit comments

Comments
 (0)