WordPress.org

Make WordPress Core

Ticket #5077: 5077.diff

File 5077.diff, 822 bytes (added by ryan, 11 years ago)

Hide warning from filesize

  • wp-admin/includes/upload.php

     
    3939                $r .= "\t\t\t$innerHTML";
    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";
    4547        $r .= "\t\t\t\t<input type='hidden' name='attachment-url-base-$id' id='attachment-url-base-$id' value='$src_base' />\n";