Skip to content

Commit

Permalink
check that honeyform_excluded_pages is an array before searching in i…
Browse files Browse the repository at this point in the history
…t, it should avoid any bugs
  • Loading branch information
erikyo committed Jan 21, 2024
1 parent cce2c6b commit 8f577cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/CF7_AntiSpam_Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ public function cf7a_honeyform( $content ) {
return $content;
}

$cf7a_options = get_option( 'cf7a_options' );
if ( in_array( $current_id, $cf7a_options['honeyform_excluded_pages'] ) ) {
if ( is_array( $this->options['honeyform_excluded_pages'] ) && in_array( $current_id, $this->options['honeyform_excluded_pages'] ) ) {
// If the current post ID is excluded, return the original content
return $content;
}
Expand Down

0 comments on commit 8f577cc

Please sign in to comment.