Check for email_notifications
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 22 Aug 2017 15:24:08 +0000 (11:24 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 22 Aug 2017 15:24:08 +0000 (11:24 -0400)
Checking before trying to array merge.

index.php

index 26b284d..d54d62f 100644 (file)
--- 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 );
 }