Skip to content

Commit

Permalink
Merge pull request #29 from rdowner22/bug/IMPB-1462-contact-form-7-id…
Browse files Browse the repository at this point in the history
…x-broker-tab-deprecated-error-present-when-creating-new-form

IMPB-1462: Fix deprecated php errors with Contact Form 7 when IDX Bro…
  • Loading branch information
rdowner22 authored Jun 7, 2024
2 parents 68b7456 + 88d4c06 commit fbc97cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions idx/leads/class-contact-form-7.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ public static function idx_cf7_settings() {
$option_name = 'idx_lead_form_' . $form_id;
$form_options = get_option( $option_name );

$checked = false;
// $form_options could be false if this is a new form (since get_option returns false when it can't find anything)
if ($form_options != false && array_key_exists('enable_lead', $form_options)) {
$checked = $form_options['enable_lead'];
if (!$form_options) {
$form_options = [];
$form_options['enable_lead'] = false;
}

$checked = $form_options['enable_lead'];
if ( ! isset( $form_options['category'] ) ) {
$form_options['category'] = '';
}
Expand Down

0 comments on commit fbc97cf

Please sign in to comment.