Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from clippings/headers-php-5.6
Browse files Browse the repository at this point in the history
Fix undefined variable error on PHP 5.6
  • Loading branch information
jjaffeux committed Sep 21, 2015
2 parents 1cdc9b2 + cc35f72 commit 923e246
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ script: phpunit

php:
- 5.3
- 5.4
- 5.4
- 5.5
- 5.6
- 7

matrix:
fast_finish: true
allow_failures:
- php: 7
14 changes: 5 additions & 9 deletions lib/Postmark/Inbound.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,20 @@ public function FromName()

public function Headers($name = 'X-Spam-Status')
{
foreach($this->Source->Headers as $header)
foreach ($this->Source->Headers as $header)
{
if(isset($header->Name) AND $header->Name == $name)
if (isset($header->Name) AND $header->Name == $name)
{
if($header->Name == 'Received-SPF')
if ($header->Name == 'Received-SPF')
{
return self::_parseReceivedSpf($header->Value);
}

return $header->Value;
}
else
{
unset($header);
}
}

return $header ? $header : FALSE;
return FALSE;
}

private static function _parseReceivedSpf($header)
Expand Down Expand Up @@ -137,4 +133,4 @@ public function HasAttachments()
return count($this->Source->Attachments) > 0 ? TRUE : FALSE;
}

}
}

0 comments on commit 923e246

Please sign in to comment.