diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 56c2ea5..22bab8d 100644
a
|
b
|
function get_attached_file( $attachment_id, $unfiltered = false ) { |
274 | 274 | $file = get_post_meta( $attachment_id, '_wp_attached_file', true ); |
275 | 275 | |
276 | 276 | // 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'] ) ) { |
278 | | $file = $uploads['basedir'] . "/$file"; |
| 277 | if ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) { |
| 278 | $file = path_join($uploads['basedir'], $file); |
279 | 279 | } |
280 | 280 | |
281 | 281 | if ( $unfiltered ) { |