diff --git a/src/Header/GenericHeader.php b/src/Header/GenericHeader.php index e0b73936..6a2aa826 100644 --- a/src/Header/GenericHeader.php +++ b/src/Header/GenericHeader.php @@ -117,7 +117,7 @@ public function setFieldValue($fieldValue) public function getFieldValue($format = HeaderInterface::FORMAT_RAW) { - if (HeaderInterface::FORMAT_ENCODED) { + if (HeaderInterface::FORMAT_ENCODED === $format) { return HeaderWrap::wrap($this->fieldValue, $this); } diff --git a/src/Header/Subject.php b/src/Header/Subject.php index 73747363..f0386570 100644 --- a/src/Header/Subject.php +++ b/src/Header/Subject.php @@ -55,7 +55,7 @@ public function getFieldName() public function getFieldValue($format = HeaderInterface::FORMAT_RAW) { - if (HeaderInterface::FORMAT_ENCODED) { + if (HeaderInterface::FORMAT_ENCODED === $format) { return HeaderWrap::wrap($this->subject, $this); } diff --git a/test/Header/SubjectTest.php b/test/Header/SubjectTest.php index a2aa16f7..8fd618d6 100644 --- a/test/Header/SubjectTest.php +++ b/test/Header/SubjectTest.php @@ -27,7 +27,7 @@ public function testHeaderFolding() $subject->setSubject($string); $expected = wordwrap($string, 78, "\r\n "); - $test = $subject->getFieldValue(); + $test = $subject->getFieldValue(Header\HeaderInterface::FORMAT_ENCODED); $this->assertEquals($expected, $test); } }