SMF: Fix export of quotes without postID
authorTim Düsterhus <tim@bastelstu.be>
Fri, 1 Jun 2018 13:27:41 +0000 (15:27 +0200)
committerTim Düsterhus <tim@bastelstu.be>
Fri, 1 Jun 2018 13:27:41 +0000 (15:27 +0200)
files/lib/system/exporter/SMF2xExporter.class.php

index f63a7e59c781c781c9dc28d9bfab122e27296ea2..e4609a7d6248d8ff3c987b59d54992c9e802bad6 100644 (file)
@@ -1376,7 +1376,7 @@ class SMF2xExporter extends AbstractExporter {
                        $quoteRegex = new Regex('\[quote author=(.*?)(?: link=topic=\d+\.msg(\d+)#msg\\2 date=\d+)?\]');
                        $quoteCallback = function ($matches) {
                                $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
-                               $postID = $matches[2];
+                               $postID = isset($matches[2]) ? $matches[2] : null;
                                
                                if ($postID) {
                                        $postLink = LinkHandler::getInstance()->getLink('Thread', [