From 4e4ba903b035d47370369e0201fb92c673951825 Mon Sep 17 00:00:00 2001 From: Craig McMahon Date: Wed, 31 Jan 2024 15:22:49 +0000 Subject: [PATCH] Fix type error when using `seeLink` --- src/Codeception/Module/WebDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index 4ae01c4..923e440 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -1367,7 +1367,7 @@ private function filterNodesByHref(string $url, array $nodes): array return array_filter( $nodes, function (WebDriverElement $e) use ($expectedUrl, $absoluteCurrentUrl): bool { - $elementHref = Uri::mergeUrls($absoluteCurrentUrl, $e->getAttribute('href')); + $elementHref = Uri::mergeUrls($absoluteCurrentUrl, $e->getAttribute('href') ?? ''); return $elementHref === $expectedUrl; } );