diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 2af241b..decd7d6 100644
a
|
b
|
function get_attached_file( $attachment_id, $unfiltered = false ) { |
289 | 289 | $file = get_post_meta( $attachment_id, '_wp_attached_file', true ); |
290 | 290 | |
291 | 291 | // If the file is relative, prepend upload dir. |
292 | | if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) ) { |
293 | | $file = $uploads['basedir'] . "/$file"; |
| 292 | if ( ( $uploads = wp_get_upload_dir() ) && ! preg_match('|://|', $file) && false === $uploads['error'] ) { |
| 293 | $file = path_join($uploads['basedir'], $file); |
294 | 294 | } |
295 | 295 | |
296 | 296 | if ( $unfiltered ) { |