From 83c7615f28f22b8892cc4960ba6e1b173a852173 Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 20:35:12 +0530 Subject: [PATCH 1/4] Update admin.php Variable $_POST in isset() always exists and is not nullable. --- admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.php b/admin.php index bdf32f0..513b56d 100755 --- a/admin.php +++ b/admin.php @@ -177,7 +177,7 @@ function wpcf7cf_after_save($contact_form) { function wpcf7cf_save_contact_form( $contact_form ) { - if ( ! isset( $_POST ) || empty( $_POST ) || ! isset( $_POST['wpcf7cf-settings-text'] ) ) { + if ( ! isset( $_POST['wpcf7cf-settings-text'] ) ) { return; } $post_id = $contact_form->id(); From 35fe810717605e3eec0298e98ea59dfa1be9b237 Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 20:39:08 +0530 Subject: [PATCH 2/4] Update admin.php getConditions() is checking array or not. --- admin.php | 1 - 1 file changed, 1 deletion(-) diff --git a/admin.php b/admin.php index 513b56d..c4ad5e0 100755 --- a/admin.php +++ b/admin.php @@ -93,7 +93,6 @@ function wpcf7cf_editor_panel_conditional($form) { $wpcf7cf_entries = CF7CF::getConditions($form_id); - if (!is_array($wpcf7cf_entries)) $wpcf7cf_entries = array(); $wpcf7cf_entries = array_values($wpcf7cf_entries); From 6ef1fec8a8f6aa8eb02f0da2faf84bd6a804c65e Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 20:45:36 +0530 Subject: [PATCH 3/4] Update wpcf7cf-options.php --- wpcf7cf-options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpcf7cf-options.php b/wpcf7cf-options.php index f5d6aa7..4ab5dea 100755 --- a/wpcf7cf-options.php +++ b/wpcf7cf-options.php @@ -63,7 +63,7 @@ function wpcf7cf_reset_options() { add_action( 'admin_enqueue_scripts', 'wpcf7cf_load_page_options_wp_admin_style' ); function wpcf7cf_load_page_options_wp_admin_style() { - wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), false, WPCF7CF_VERSION ); + wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), array(), WPCF7CF_VERSION ); wp_enqueue_style( 'wpcf7cf_admin_css' ); } @@ -294,4 +294,4 @@ function wpcf7cf_dismiss_notice() { $settings = wpcf7cf_get_settings(); $settings['notice_dismissed'.$notice_suffix] = true; wpcf7cf_set_options($settings); -} \ No newline at end of file +} From 42105aa3982a92070058900aabcceebe4e18b015 Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 20:47:03 +0530 Subject: [PATCH 4/4] Update wpcf7cf-options.php --- wpcf7cf-options.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/wpcf7cf-options.php b/wpcf7cf-options.php index 4ab5dea..63882b0 100755 --- a/wpcf7cf-options.php +++ b/wpcf7cf-options.php @@ -205,8 +205,6 @@ function wpcf7cf_input_field($slug, $args) { $args = wp_parse_args( $args, $defaults ); extract($args); - $label; $description; $default; $label_editable; - if (!key_exists($slug, $settings)) { $settings[$slug] = $default; $settings[$slug.'_label'] = $label;