Skip to content

Commit

Permalink
Avoid logging error erroneously (#923)
Browse files Browse the repository at this point in the history
Fixes #922
  • Loading branch information
mjauvin committed Jun 13, 2023
1 parent 1ad2671 commit 635dd6c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions classes/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1395,12 +1395,15 @@ protected function themeCombineAssets(array $url): string
if (File::exists($asset)) {
$assets[] = $asset;
break;
} else {
$asset = null;
}
}

// Skip combining missing assets and log an error
Log::error("$file could not be found in any of the theme's sources (" . implode(', ', $sources) . ',');
continue;
if (is_null($asset)) {
// Skip combining missing assets and log an error
Log::error("$file could not be found in any of the theme's sources (" . implode(', ', $sources) . ',');
continue;
}
}

Cache::put($cacheKey, $assets);
Expand Down

0 comments on commit 635dd6c

Please sign in to comment.