Skip to content

Commit

Permalink
Fix issue with importing in Windows
Browse files Browse the repository at this point in the history
Don't follow coding standards that don't make sense WordPress/WordPress-Coding-Standards#1720
Strategy11/formidable-pro#2296
  • Loading branch information
stephywells committed Jul 12, 2019
1 parent ef6760f commit 0f11333
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/controllers/FrmXMLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public static function import_xml() {
return;
}

$file = isset( $_FILES['frm_import_file']['tmp_name'] ) ? wp_unslash( $_FILES['frm_import_file']['tmp_name'] ) : '';
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
$file = isset( $_FILES['frm_import_file']['tmp_name'] ) ? $_FILES['frm_import_file']['tmp_name'] : '';

if ( ! is_uploaded_file( $file ) ) {
unset( $file );
Expand All @@ -192,7 +193,8 @@ public static function import_xml() {
);
$export_format = apply_filters( 'frm_export_formats', $export_format );

$file_type = strtolower( pathinfo( wp_unslash( $_FILES['frm_import_file']['name'] ), PATHINFO_EXTENSION ) );
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
$file_type = strtolower( pathinfo( $_FILES['frm_import_file']['name'], PATHINFO_EXTENSION ) );
if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) {
// allow other file types to be imported
do_action( 'frm_before_import_' . $file_type );
Expand Down

0 comments on commit 0f11333

Please sign in to comment.