Notice fixes. See #7509 props DD32.

git-svn-id: http://svn.automattic.com/wordpress/trunk@9177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2008-10-14 21:08:28 +00:00
parent 4e4c26678e
commit a0f339d3bf
3 changed files with 5 additions and 5 deletions

View File

@@ -28,10 +28,8 @@
function get_attached_file( $attachment_id, $unfiltered = false ) {
$file = get_post_meta( $attachment_id, '_wp_attached_file', true );
// If the file is relative, prepend upload dir
if ( 0 !== strpos($file, '/') ) {
$uploads = wp_upload_dir();
if ( 0 !== strpos($file, '/') && ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) )
$file = $uploads['basedir'] . "/$file";
}
if ( $unfiltered )
return $file;