diff --git a/gp-entry-blocks/gpeb-process-feeds-on-edit.php b/gp-entry-blocks/gpeb-process-feeds-on-edit.php index f5ee6a5b8..26eb7cb3b 100644 --- a/gp-entry-blocks/gpeb-process-feeds-on-edit.php +++ b/gp-entry-blocks/gpeb-process-feeds-on-edit.php @@ -29,6 +29,12 @@ add_filter( 'gform_is_feed_asynchronous', '__return_false', $filter_priority ); add_filter( 'gform_addon_pre_process_feeds', function( $feeds, $entry, $form ) use ( $excluded_feed_ids ) { + // If no feeds are present, return. + if ( ! is_array( $feeds ) ) { + return $feeds; + } + + // Filter feeds excluding the ones in the excluded feed ids array. $feeds = array_filter( $feeds, function( $feed ) use ( $excluded_feed_ids ) { return ! in_array( $feed['id'], $excluded_feed_ids ); } );