Prevent warnings when reading the directory fails
(There will still be error messages)pull/4/head
parent
cb8640195e
commit
ee02f08bdb
|
@ -1578,7 +1578,9 @@ Class H5PExport {
|
||||||
*/
|
*/
|
||||||
private static function populateFileList($dir, &$files, $relative = '') {
|
private static function populateFileList($dir, &$files, $relative = '') {
|
||||||
$strip = strlen($dir) + 1;
|
$strip = strlen($dir) + 1;
|
||||||
foreach (glob($dir . DIRECTORY_SEPARATOR . '*') as $file) {
|
$contents = glob($dir . DIRECTORY_SEPARATOR . '*');
|
||||||
|
if (!empty($contents)) {
|
||||||
|
foreach ($contents as $file) {
|
||||||
$rel = $relative . substr($file, $strip);
|
$rel = $relative . substr($file, $strip);
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
self::populateFileList($file, $files, $rel . '/');
|
self::populateFileList($file, $files, $rel . '/');
|
||||||
|
@ -1591,6 +1593,7 @@ Class H5PExport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete .h5p file
|
* Delete .h5p file
|
||||||
|
|
Loading…
Reference in New Issue