From: Steve Sutton Date: Fri, 28 Jul 2017 13:17:14 +0000 (-0400) Subject: Fix for no categories X-Git-Tag: v1.6.57^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=888c9a4f9dac037792741fc40d98d2b174a3adb1;p=WP-Plugins%2Fglm-member-db-events.git Fix for no categories was an error. cats would return an array with a false value. --- diff --git a/models/front/events/baseAction.php b/models/front/events/baseAction.php index 69d45f3..2a03575 100644 --- a/models/front/events/baseAction.php +++ b/models/front/events/baseAction.php @@ -238,7 +238,7 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents } // Get cats if categoryId is an array - $cats = filter_var( $categoryId, FILTER_VALIDATE_INT, array( 'flags' => FILTER_FORCE_ARRAY ) ); + $cats = array_filter( filter_var( $categoryId, FILTER_VALIDATE_INT, array( 'flags' => FILTER_FORCE_ARRAY ) ) ); $catId = filter_var( $categoryId, FILTER_VALIDATE_INT ); // If a category ID is supplied if ( $catId ) {