Skip to content

Commit bb32446

Browse files
committed
gpeb-process-feeds-on-edit.php: Fixed an issue with the snippet causing fatal error.
1 parent 6b9e42a commit bb32446

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gp-entry-blocks/gpeb-process-feeds-on-edit.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
add_filter( 'gform_is_feed_asynchronous', '__return_false', $filter_priority );
3030

3131
add_filter( 'gform_addon_pre_process_feeds', function( $feeds, $entry, $form ) use ( $excluded_feed_ids ) {
32+
// If no feeds are present, return.
33+
if ( ! is_array( $feeds ) ) {
34+
return $feeds;
35+
}
36+
37+
// Filter feeds excluding the ones in the excluded feed ids array.
3238
$feeds = array_filter( $feeds, function( $feed ) use ( $excluded_feed_ids ) {
3339
return ! in_array( $feed['id'], $excluded_feed_ids );
3440
} );

0 commit comments

Comments
 (0)