Do not cache assets without files

pull/17/head
Frode Petterson 2016-01-25 14:47:48 +01:00
parent 875a7ccef3
commit 64e2001156
1 changed files with 4 additions and 1 deletions

View File

@ -157,8 +157,11 @@ class H5PDefaultStorage implements \H5PFileStorage {
*/
public function cacheAssets(&$files, $key) {
foreach ($files as $type => $assets) {
$content = '';
if (empty($assets)) {
continue; // Skip no assets
}
$content = '';
foreach ($assets as $asset) {
// Get content from asset file
$assetContent = file_get_contents($this->path . $asset->path);