From 36a0d478139ee2f5624b8ef9fb6cd9ac68d51515 Mon Sep 17 00:00:00 2001 From: mhossain Date: Mon, 3 Apr 2017 00:31:32 -0400 Subject: [PATCH] fix issue with php 5.3x --- sparkpost.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sparkpost.class.php b/sparkpost.class.php index bc5e3708..f7b4b6c0 100644 --- a/sparkpost.class.php +++ b/sparkpost.class.php @@ -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'; } }