Changeset 6191

Show
Ignore:
Timestamp:
10/05/07 16:29:55 (1 year ago)
Author:
ryan
Message:

Fix filesize warnings. fixes #5077 for 2.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3/wp-admin/includes/upload.php

    r5965 r6191  
    4040    if ( $href ) 
    4141        $r .= "</a>\n"; 
    42     $r .= "\t\t\t\t<span class='upload-file-size'>".size_format(filesize($filesystem_path))."</span>\n"; 
     42    $size = @filesize($filesystem_path); 
     43    if ( !empty($size) ) 
     44        $r .= "\t\t\t\t<span class='upload-file-size'>".size_format($size)."</span>\n"; 
    4345    $r .= "\n\t\t<div class='upload-file-data'>\n\t\t\t<p>\n"; 
    4446    $r .= "\t\t\t\t<input type='hidden' name='attachment-url-$id' id='attachment-url-$id' value='$src' />\n";