diff --git a/h5p.classes.php b/h5p.classes.php index 1fe5140..ec363f0 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1610,7 +1610,9 @@ Class H5PExport { foreach ($files as $file) { // Please note that the zip format has no concept of folders, we must // use forward slashes to separate our directories. - $zip->addFile(realpath($file->absolutePath), $file->relativePath); + if (file_exists(realpath($file->absolutePath))) { + $zip->addFile(realpath($file->absolutePath), $file->relativePath); + } } // Close zip and remove tmp dir