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

Only attempt to attach artefacts to blog posts if they were actually created.

Fixes an exception caused by uploading just a leap2a XML file instead of
the zip file. In this case, the leap2a file refers to attachments that
(naturally) aren't included with the upload.
Signed-off-by: default avatarNigel McNie <>
parent 4ff89f01
......@@ -154,8 +154,10 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
$importer->trace("Attaching file $blogpostlink[href] to blog post $blogpostentry->id", PluginImportLeap::LOG_LEVEL_VERBOSE);
$artefactids = $importer->get_artefactids_imported_by_entryid((string)$blogpostlink['href']);
if (isset($artefactids[0])) {
if ($blogpost) {
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