diff --git a/tests/BaseElementTest.php b/tests/BaseElementTest.php index dbc91706..4688b476 100644 --- a/tests/BaseElementTest.php +++ b/tests/BaseElementTest.php @@ -481,7 +481,7 @@ public function testPreviewLink(string $class, string $elementIdentifier, ?strin { /** @var BaseElement $element */ $element = $this->objFromFixture($class, $elementIdentifier); - $previewLink = $element->PreviewLink(); + $previewLink = $element->PreviewLink() ?? ''; // Remove SubsiteID from preview link in case subsites is installed $rx = '/[?|&]SubsiteID=[0-9]+/'; if (preg_match($rx, $previewLink)) {