From 164f1186772ffee560147205d2896c2a81df8c9d Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 1 Jun 2018 10:29:30 -0400 Subject: [PATCH] Trim each email before validating it. An empty space in email won't allow it to be valid. Still ok to send out that way. --- classes/helper/notification.php | 2 +- index.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/helper/notification.php b/classes/helper/notification.php index cc84165..4f84fd3 100644 --- a/classes/helper/notification.php +++ b/classes/helper/notification.php @@ -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; } diff --git a/index.php b/index.php index f947d11..4e41ee2 100644 --- 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 * @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. -- 2.17.1