Commit 566ea78f authored by Nigel McNie's avatar Nigel McNie
Browse files

Improved error handling if index.html for the export can't be written out.

parent c19e99a1
......@@ -162,7 +162,9 @@ class PluginExportHtml extends PluginExport {
$smarty = $this->get_smarty();
$smarty->assign('summaries', $summaries);
$content = $smarty->fetch('export:html:index.tpl');
file_put_contents($this->exportdir . '/' . $this->rootdir . '/index.html', $content);
if (!file_put_contents($this->exportdir . '/' . $this->rootdir . '/index.html', $content)) {
throw new SystemException("Could not create index.html for the export");
}
}
/**
......
Markdown is supported
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