diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index 681fcbfda..82401ffb2 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/src/Composer/Command/RequireCommand.php @@ -82,7 +82,7 @@ EOT return 1; } - if (file_get_contents($file) === '') { + if (filesize($file) === 0) { file_put_contents($file, "{\n}\n"); }