From: Steve Sutton Date: Tue, 22 Aug 2017 15:24:08 +0000 (-0400) Subject: Check for email_notifications X-Git-Tag: v1.6.61^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=59cdf4ee1d16adc744f4fb071f3795353c42e656;p=WP-Plugins%2Fglm-member-db-events.git Check for email_notifications Checking before trying to array merge. --- diff --git a/index.php b/index.php index 26b284d..d54d62f 100644 --- a/index.php +++ b/index.php @@ -151,7 +151,7 @@ if (is_file(GLM_MEMBERS_EVENTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) { $eventsManagementSettings = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A ); // Grab the new email_notification to_email and from_email to add to these (override) $emailNotifications = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX."email_notifications WHERE id = 1", ARRAY_A ); -if ( $eventsManagementSettings ) { +if ( $eventsManagementSettings && $emailNotifications ) { $eventsManagementSettings = array_merge( $eventsManagementSettings, $emailNotifications ); }