Trim each email before validating it.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 1 Jun 2018 14:29:30 +0000 (10:29 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 1 Jun 2018 14:29:30 +0000 (10:29 -0400)
An empty space in email won't allow it to be valid.
Still ok to send out that way.

classes/helper/notification.php
index.php

index cc84165..4f84fd3 100644 (file)
@@ -167,7 +167,7 @@ class GlmMembersAdmin_package_notification extends GlmDataMembers
         // Double check the email for valid address
         $emails = explode( ',', $notify_to );
         foreach ( $emails as $email ) {
-            $validEmail = filter_var( $email, FILTER_VALIDATE_EMAIL );
+            $validEmail = filter_var( trim( $email ), FILTER_VALIDATE_EMAIL );
             if ( !$validEmail ) {
                 return false;
             }
index f947d11..4e41ee2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Packaging
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.2.18
+ * Version: 1.2.19
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabasePackagingAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.2.18
+ * @version 1.2.19
  */
 
 // Check that we're being called by WordPress.
@@ -43,7 +43,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_PACKAGING_PLUGIN_VERSION', '1.2.18');
+define('GLM_MEMBERS_PACKAGING_PLUGIN_VERSION', '1.2.19');
 define('GLM_MEMBERS_PACKAGING_PLUGIN_DB_VERSION', '1.1.7');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.