Skip to content

Commit

Permalink
Test if subject property is set
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylegrone committed Jun 30, 2014
1 parent cedfbc4 commit 8211444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ImapMailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public function getMail($mailId) {
$mail = new IncomingMail();
$mail->id = $mailId;
$mail->date = date('Y-m-d H:i:s', isset($head->date) ? strtotime($head->date) : time());
$mail->subject = $this->decodeMimeStr($head->subject, $this->serverEncoding);
$mail->subject = isset($head->subject) ? $this->decodeMimeStr($head->subject, $this->serverEncoding) : null;
$mail->fromName = isset($head->from[0]->personal) ? $this->decodeMimeStr($head->from[0]->personal, $this->serverEncoding) : null;
$mail->fromAddress = strtolower($head->from[0]->mailbox . '@' . $head->from[0]->host);

Expand Down

0 comments on commit 8211444

Please sign in to comment.