Skip to content

Commit

Permalink
fix issue with php 5.3x
Browse files Browse the repository at this point in the history
  • Loading branch information
rajumsys committed Apr 3, 2017
1 parent b4df544 commit 36a0d47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sparkpost.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ public function init_sp_http_mailer($args)
return $args;
}

static function is_sandbox($email) {
return array_slice(explode('@', $email), -1)[0] === 'sparkpostbox.com';
static function is_sandbox($email)
{
$email_splitted = array_slice(explode('@', $email), -1);
return $email_splitted[0] === 'sparkpostbox.com';
}
}

0 comments on commit 36a0d47

Please sign in to comment.