Skip to content

Commit

Permalink
avoid URI corruption when working with stream
Browse files Browse the repository at this point in the history
  • Loading branch information
phowen-cisco committed Aug 17, 2017
1 parent c7a27c6 commit ca5024c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function emr_normalize_file_urls( $old, $new ) {

$current_file = get_attached_file((int) $_POST["ID"], apply_filters( 'emr_unfiltered_get_attached_file', true ));
$current_path = substr($current_file, 0, (strrpos($current_file, "/")));
$current_file = str_replace("//", "/", $current_file);
$current_file = preg_replace("|(?<!:)//|", "/", $current_file);
$current_filename = basename($current_file);
$current_metadata = wp_get_attachment_metadata( $_POST["ID"] );

Expand Down

0 comments on commit ca5024c

Please sign in to comment.