Avoid logging error erroneously (#923)

Fixes #922
This commit is contained in:
Marc Jauvin 2023-06-13 17:58:27 -04:00 committed by GitHub
parent 428d2bcad8
commit 9632e62920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1395,12 +1395,15 @@ class Controller
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);