From ad9d1cb1f9a9e6eff27c74be8352f12c213b2738 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 13 Mar 2019 15:48:46 +0100 Subject: [PATCH] Fixed import of orphaned attachments (IPB4) --- files/lib/system/exporter/IPB4xExporter.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/lib/system/exporter/IPB4xExporter.class.php b/files/lib/system/exporter/IPB4xExporter.class.php index 55bff1f..e0fee83 100644 --- a/files/lib/system/exporter/IPB4xExporter.class.php +++ b/files/lib/system/exporter/IPB4xExporter.class.php @@ -969,6 +969,8 @@ class IPB4xExporter extends AbstractExporter { $statement = $this->database->prepareStatement($sql, $limit, $offset); $statement->execute([$type]); while ($row = $statement->fetchArray()) { + if (!$row['attach_id']) continue; // skip orphaned attachments + $fileLocation = $this->fileSystemPath.'uploads/'.$row['attach_location']; ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], [ -- 2.20.1