Index: LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php |
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php b/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php |
index 9e7281b11b47b98f1fe9667e6607d74953628690..4b0ac105a22b8a621a43057eff0e7cbe7c8f9236 100644 |
--- a/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php |
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php |
@@ -18,7 +18,7 @@ foreach ($_FILES as $key => $value) { |
} else { |
$fp = fopen($file['tmp_name'], 'r'); |
if ($fp) { |
- $content = fread($fp, $file['size']); |
+ $content = $file['size'] > 0 ? fread($fp, $file['size']) : ""; |
fclose($fp); |
} |
$values[] = $key . '=' . $file['name'] . ':' . $file['type'] . ':' . $content; |