Explorar el Código

Optimize check for empty file

vlakoff hace 10 años
padre
commit
d5ab072ec1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Composer/Command/RequireCommand.php

+ 1 - 1
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");
         }