Skip to content

Commit 86299f6

Browse files
committed
Minor correction
1 parent 85e9110 commit 86299f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pdf-forms-for-contact-form-7.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ public function wp_ajax_get_attachment_info()
12211221
throw new Exception( __( "Nonce mismatch", 'pdf-forms-for-contact-form-7' ) );
12221222

12231223
$attachment_id = $_POST[ 'file_id' ];
1224-
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : null;
1224+
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : "";
12251225

12261226
$filepath = get_attached_file( $attachment_id );
12271227
if( !$filepath )
@@ -1533,7 +1533,7 @@ public function wp_ajax_query_tags()
15331533

15341534
$attachments = isset( $_POST['attachments'] ) ? $_POST['attachments'] : null;
15351535
$all = isset( $_POST['all'] ) ? $_POST['all'] : null;
1536-
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : null;
1536+
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : "";
15371537

15381538
if( !isset($attachments) || !is_array($attachments) )
15391539
$attachments = array();
@@ -1650,7 +1650,7 @@ public function wp_ajax_preload_data()
16501650
throw new Exception( __( "Nonce mismatch", 'pdf-forms-for-contact-form-7' ) );
16511651

16521652
$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : null;
1653-
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : null;
1653+
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : "";
16541654

16551655
if( ! $post_id )
16561656
throw new Exception( __( "Invalid post ID", 'pdf-forms-for-contact-form-7' ) );
@@ -1757,7 +1757,7 @@ public function wp_ajax_query_cf7_fields()
17571757
if ( ! check_ajax_referer( 'wpcf7-pdf-forms-ajax-nonce', 'nonce', false ) )
17581758
throw new Exception( __( "Nonce mismatch", 'pdf-forms-for-contact-form-7' ) );
17591759

1760-
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : null;
1760+
$form = isset( $_POST['wpcf7-form'] ) ? wp_unslash( $_POST['wpcf7-form'] ) : "";
17611761

17621762
$fields = $this->query_cf7_fields( $form );
17631763

0 commit comments

Comments
 (0)