summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLF Bittencourt <github@lfbittencourt.com>2016-04-22 15:16:07 -0300
committerRichard Leland <rich@richleland.com>2016-04-22 14:16:07 -0400
commit5410eabfe06ff374434f8ad79ff9cb3b4e6281bf (patch)
tree5f2de9f884b2d685473f22aa1ac4ae4f70b43920
parent34a4ae387ad4f74f69ba00296430918824727422 (diff)
downloadphp-sparkpost-5410eabfe06ff374434f8ad79ff9cb3b4e6281bf.zip
php-sparkpost-5410eabfe06ff374434f8ad79ff9cb3b4e6281bf.tar.gz
php-sparkpost-5410eabfe06ff374434f8ad79ff9cb3b4e6281bf.tar.bz2
Update key validation
Fixes #75
-rw-r--r--lib/SparkPost/SparkPost.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php
index 46623c9..4cfe5b7 100644
--- a/lib/SparkPost/SparkPost.php
+++ b/lib/SparkPost/SparkPost.php
@@ -115,7 +115,7 @@ class SparkPost {
}
// Validate API key because its required
- if (!isset($settingsConfig['key']) || empty(trim($settingsConfig['key']))){
+ if (!isset($settingsConfig['key']) || !preg_match('/\S/', $settingsConfig['key'])){
throw new \Exception('You must provide an API key');
}