Skip to content

Commit

Permalink
Merge pull request #246 from mzur/patch-1
Browse files Browse the repository at this point in the history
Fix EmailSelect action cleaning of 'recipient'
  • Loading branch information
mzur authored Apr 5, 2023
2 parents 547040e + db46be6 commit 4d1dbe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Actions/EmailSelectAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class EmailSelectAction extends EmailAction
public function perform()
{
$this->options['to'] = $this->getRecipient();
unset($this->data[self::RECIPIENT_FIELD]);
$this->form->forget(self::RECIPIENT_FIELD);
unset($this->options['allowed-recipients']);

return parent::perform();
Expand Down
2 changes: 1 addition & 1 deletion tests/Actions/EmailSelectActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testRecipient()
]);
$action->perform();
$this->assertEquals('[email protected]', $action->params['to']);
$this->assertFalse(array_key_exists('recipient', $action->params));
$this->assertArrayNotHasKey('recipient', $action->params['data']);
}

public function testRecipientNotAllowed()
Expand Down

0 comments on commit 4d1dbe4

Please sign in to comment.