diff --git a/modules/custom/az_card/src/Plugin/Field/FieldFormatter/AZCardDefaultFormatter.php b/modules/custom/az_card/src/Plugin/Field/FieldFormatter/AZCardDefaultFormatter.php index 13ffe27af7..9090bdfc8b 100644 --- a/modules/custom/az_card/src/Plugin/Field/FieldFormatter/AZCardDefaultFormatter.php +++ b/modules/custom/az_card/src/Plugin/Field/FieldFormatter/AZCardDefaultFormatter.php @@ -131,9 +131,10 @@ public function viewElements(FieldItemListInterface $items, $langcode) { $link_url = Url::fromUri(urldecode('base:' . $item->link_uri)); } else { - if (strcmp($item->link_uri, "#") == 0) { + if (strcmp($item->link_uri, "#") === 0) { $link_url = $this->pathValidator->getUrlIfValid(''); - } else { + } + else { $link_url = $this->pathValidator->getUrlIfValid($item->link_uri ?? ''); } }