Improve error handling.

redesign-copyrights
Frode Petterson 2015-06-22 10:02:07 +02:00
parent 2beff66195
commit 6ad53d66f3
1 changed files with 5 additions and 0 deletions

View File

@ -660,6 +660,11 @@ class H5PValidator {
$tmpDir = $this->h5pF->getUploadedH5pFolderPath();
$tmpPath = $this->h5pF->getUploadedH5pPath();
if (!H5PCore::dirReady($tmpDir)) {
$this->h5pF->setErrorMessage($this->h5pF->t('Unable to write to the temporary directory.'));
return FALSE;
}
$valid = TRUE;
// Extract and then remove the package file.