fix php error
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 6 Jul 2016 13:30:58 +0000 (09:30 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 6 Jul 2016 13:30:58 +0000 (09:30 -0400)
error when trying to filter array. needs a check to make sure it is an
array first.

index.php
models/front/members/list.php

index d955240..0b77397 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 2.1.17
+ * Version: 2.1.18
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabase
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.1.17
+ * @version 2.1.18
  */
 
 /*
@@ -38,7 +38,7 @@
  *
  */
 
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.17');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.1.18');
 define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.11');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
index e6f7079..17c116f 100644 (file)
@@ -444,7 +444,7 @@ class GlmMembersFront_members_list extends GlmDataMemberInfo
                 } // If we have a sane amenity ID
             } // If an amenity search has been selected
         } // it doing amenity search
-        $amenityData = array_filter( $amenityData );
+        $amenityData = ( is_array( $amenityData ) ) ? array_filter( $amenityData ) : array();
 
         // Only look at active member information where the member is displayable  (access = 20, 30, 40)
         $where .= $whereSep."