@@ -1221,7 +1221,7 @@ public function wp_ajax_get_attachment_info()
1221
1221
throw new Exception ( __ ( "Nonce mismatch " , 'pdf-forms-for-contact-form-7 ' ) );
1222
1222
1223
1223
$ 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 ' ] ) : "" ;
1225
1225
1226
1226
$ filepath = get_attached_file ( $ attachment_id );
1227
1227
if ( !$ filepath )
@@ -1533,7 +1533,7 @@ public function wp_ajax_query_tags()
1533
1533
1534
1534
$ attachments = isset ( $ _POST ['attachments ' ] ) ? $ _POST ['attachments ' ] : null ;
1535
1535
$ 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 ' ] ) : "" ;
1537
1537
1538
1538
if ( !isset ($ attachments ) || !is_array ($ attachments ) )
1539
1539
$ attachments = array ();
@@ -1650,7 +1650,7 @@ public function wp_ajax_preload_data()
1650
1650
throw new Exception ( __ ( "Nonce mismatch " , 'pdf-forms-for-contact-form-7 ' ) );
1651
1651
1652
1652
$ 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 ' ] ) : "" ;
1654
1654
1655
1655
if ( ! $ post_id )
1656
1656
throw new Exception ( __ ( "Invalid post ID " , 'pdf-forms-for-contact-form-7 ' ) );
@@ -1757,7 +1757,7 @@ public function wp_ajax_query_cf7_fields()
1757
1757
if ( ! check_ajax_referer ( 'wpcf7-pdf-forms-ajax-nonce ' , 'nonce ' , false ) )
1758
1758
throw new Exception ( __ ( "Nonce mismatch " , 'pdf-forms-for-contact-form-7 ' ) );
1759
1759
1760
- $ form = isset ( $ _POST ['wpcf7-form ' ] ) ? wp_unslash ( $ _POST ['wpcf7-form ' ] ) : null ;
1760
+ $ form = isset ( $ _POST ['wpcf7-form ' ] ) ? wp_unslash ( $ _POST ['wpcf7-form ' ] ) : "" ;
1761
1761
1762
1762
$ fields = $ this ->query_cf7_fields ( $ form );
1763
1763
0 commit comments