Commit ad2d76ea authored by Nigel McNie's avatar Nigel McNie
Browse files

Finish silently if there is no blog temporary upload directory when running clean_post_files.

It's more than likely that nobody has uploaded anything yet.
parent ddab31dd
......@@ -75,7 +75,9 @@ class PluginArtefactBlog extends PluginArtefact {
$bloguploadbase = get_config('dataroot') . ArtefactTypeBlogPost::$blogattachmentroot;
if (!$basedir = opendir($bloguploadbase)) {
throw new Exception('Unable to read blog upload directory '.$bloguploadbase);
// If the directory doesn't exist, it's likely that it hasn't been
// created yet (i.e. nobody has uploaded any files)
return;
}
$currenttime = time();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment