Skip to content

Commit

Permalink
Version checks are no use for language constructs
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Oct 21, 2015
1 parent dc0e093 commit 0f24d1e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3025,21 +3025,13 @@ public function alternativeExists()
* @param string $kind 'to', 'cc', or 'bcc'
* @return void
*/
protected function clearQueuedAddresses($kind)
public function clearQueuedAddresses($kind)
{
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
$RecipientsQueue = $this->RecipientsQueue;
foreach ($RecipientsQueue as $address => $params) {
if ($params[0] == $kind) {
unset($this->RecipientsQueue[$address]);
}
$RecipientsQueue = $this->RecipientsQueue;
foreach ($RecipientsQueue as $address => $params) {
if ($params[0] == $kind) {
unset($this->RecipientsQueue[$address]);
}
} else {
$this->RecipientsQueue = array_filter(
$this->RecipientsQueue,
function ($params) use ($kind) {
return $params[0] != $kind;
});
}
}

Expand Down

0 comments on commit 0f24d1e

Please sign in to comment.