From 184d9bec2d6c389dc5c33380ba6e97fdba934fc2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 15 Mar 2005 22:25:40 +0000 Subject: [PATCH] Don't try to read a zero length file. http://mosquito.wordpress.org/view.php?id=1116 Props: MC_incubus git-svn-id: https://develop.svn.wordpress.org/trunk@2448 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/theme-editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);