fix(legacy): gracefully handle missing asset checksum

This commit is contained in:
jo 2022-10-07 16:25:37 +02:00 committed by Kyle Robbertze
parent 966ccfa29a
commit 181f770dbb
1 changed files with 7 additions and 1 deletions

View File

@ -10,7 +10,13 @@ class Assets
self::$cache = json_decode(@file_get_contents(APPLICATION_PATH . '/assets.json'), true);
}
return self::$cache[$path];
if (array_key_exists($path, self::$cache)) {
return self::$cache[$path];
}
Logging::error("Missing asset checksum for '{$path}'");
return strval(time());
}
public static function url($path)