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

Commit 923e246

Browse files
committed
Merge pull request #8 from clippings/headers-php-5.6
Fix undefined variable error on PHP 5.6
2 parents 1cdc9b2 + cc35f72 commit 923e246

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,12 @@ script: phpunit
33

44
php:
55
- 5.3
6-
- 5.4
6+
- 5.4
7+
- 5.5
8+
- 5.6
9+
- 7
10+
11+
matrix:
12+
fast_finish: true
13+
allow_failures:
14+
- php: 7

lib/Postmark/Inbound.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,20 @@ public function FromName()
6969

7070
public function Headers($name = 'X-Spam-Status')
7171
{
72-
foreach($this->Source->Headers as $header)
72+
foreach ($this->Source->Headers as $header)
7373
{
74-
if(isset($header->Name) AND $header->Name == $name)
74+
if (isset($header->Name) AND $header->Name == $name)
7575
{
76-
if($header->Name == 'Received-SPF')
76+
if ($header->Name == 'Received-SPF')
7777
{
7878
return self::_parseReceivedSpf($header->Value);
7979
}
8080

8181
return $header->Value;
8282
}
83-
else
84-
{
85-
unset($header);
86-
}
8783
}
8884

89-
return $header ? $header : FALSE;
85+
return FALSE;
9086
}
9187

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

140-
}
136+
}

0 commit comments

Comments
 (0)