diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 51ca0b29b8..f216da0d11 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -72,7 +72,7 @@ default: if (!is_file($real_file)) $error = 1; - if (!$error) { + if (!$error && filesize($real_file) > 0) { $f = fopen($real_file, 'r'); $content = fread($f, filesize($real_file)); $content = htmlspecialchars($content);