Skip to content

Commit 3e5215b

Browse files
committed
validate empty cache file by filesize
1 parent 01dd34f commit 3e5215b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sushi.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static function bootSushi()
8181
$states['no-caching-capabilities']();
8282
break;
8383

84-
case file_exists($cachePath) && filemtime($dataPath) <= filemtime($cachePath):
84+
case file_exists($cachePath) && filesize($cachePath) > 0 && filemtime($dataPath) <= filemtime($cachePath):
8585
$states['cache-file-found-and-up-to-date']();
8686
break;
8787

0 commit comments

Comments
 (0)