Make WordPress Core

Changeset 6191


Ignore:
Timestamp:
10/05/2007 04:29:55 PM (17 years ago)
Author:
ryan
Message:

Fix filesize warnings. fixes #5077 for 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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";
Note: See TracChangeset for help on using the changeset viewer.