Skip to content

Commit

Permalink
MNT Handle null variable (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz authored Jul 6, 2023
1 parent e72dd51 commit 1289f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/BaseElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1289f01

Please sign in to comment.