Make WordPress Core

Ticket #36308: 36308.diff

File 36308.diff, 1.0 KB (added by stevenlinx, 7 years ago)
  • new file src/.vscode/settings.json

    diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json
    new file mode 100644
    index 0000000..20af2f6
    - +  
     1// Place your settings in this file to overwrite default and user settings.
     2{
     3}
     4 No newline at end of file
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index 56c2ea5..ed56932 100644
    a b function get_attached_file( $attachment_id, $unfiltered = false ) { 
    274274        $file = get_post_meta( $attachment_id, '_wp_attached_file', true );
    275275
    276276        // If the file is relative, prepend upload dir.
    277         if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) ) {
     277        if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) && ! preg_match('|:/|', $file) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) ) {
    278278                $file = $uploads['basedir'] . "/$file";
    279279        }
    280280