소스 검색

Optimize check for empty file

vlakoff 10 년 전
부모
커밋
d5ab072ec1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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");
         }