From 1289f011a2fb30e6a2ce3fa53dacca80b6517cb4 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 7 Jul 2023 11:43:26 +1200 Subject: [PATCH] MNT Handle null variable (#1074) --- tests/BaseElementTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {