Merge pull request #613 from jgen/develop

Fix issue with archive handler if there is no add_status() method for the theme.
This commit is contained in:
Jeff 2017-05-13 17:49:17 -07:00 committed by GitHub
commit dfc536807c

View File

@ -35,9 +35,11 @@ class ArchiveFileHandler extends Extension {
exec($cmd);
$results = add_dir($tmpdir);
if(count($results) > 0) {
// FIXME no theme?
// Not all themes have the add_status() method, so need to check before calling.
if (method_exists($this->theme, "add_status")) {
$this->theme->add_status("Adding files", $results);
}
}
deltree($tmpdir);
$event->image_id = -2; // default -1 = upload wasn't handled
}