Skip to content

Commit

Permalink
Fix filemtime of first attend error
Browse files Browse the repository at this point in the history
  • Loading branch information
basteyy committed Apr 7, 2021
1 parent 30f0ebe commit 64b91fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PlatesLocalAssetsCopy.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function getLocalCached(string $url): string
{
$filename = basename($url);
$cacheFile = $this->cachePath . '/' . $filename;
$filemtime = filemtime($cacheFile);
$filemtime = file_exists($cacheFile) ? filemtime($cacheFile) : false;

if (!file_exists($cacheFile) || $filemtime < $this->cacheDeadline) {
if (!$filemtime || $filemtime < $this->cacheDeadline) {
$this->downloader->download($url);

if ($this->downloader->getStatusCode() !== 200) {
Expand Down

0 comments on commit 64b91fe

Please sign in to comment.