1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

Optimize check for empty file

This commit is contained in:
vlakoff 2015-03-17 15:52:44 +01:00
parent 3a68534d20
commit d5ab072ec1

View file

@ -82,7 +82,7 @@ EOT
return 1;
}
if (file_get_contents($file) === '') {
if (filesize($file) === 0) {
file_put_contents($file, "{\n}\n");
}