Skip to content

Commit

Permalink
bug #36751 [Mime] fix bad method call on EmailAddressContains (Kocal)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] fix bad method call on `EmailAddressContains`

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | -
| License       | MIT
| Doc PR        | -

There is no method `Address` on [`MailboxHeader`](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Mime/Header/MailboxHeader.php), but a method `getAddress`.

Commits
-------

227ebd2 [Mime] fix bad method call on "EmailAddressContains"
  • Loading branch information
nicolas-grekas committed May 8, 2020
2 parents 2dbfeb9 + 227ebd2 commit a609375
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -48,7 +48,7 @@ protected function matches($message): bool

$header = $message->getHeaders()->get($this->headerName);
if ($header instanceof MailboxHeader) {
return $this->expectedValue === $header->Address()->getAddress();
return $this->expectedValue === $header->getAddress()->getAddress();
} elseif ($header instanceof MailboxListHeader) {
foreach ($header->getAddresses() as $address) {
if ($this->expectedValue === $address->getAddress()) {
Expand Down

0 comments on commit a609375

Please sign in to comment.