Skip to content

Commit bdc23df

Browse files
Merge pull request #175 from VanOns/fix/oembed-service
[Fix] Prevent fetching if endpoint was not found
2 parents 26d1dd2 + 6eedbb1 commit bdc23df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Services/OEmbedService.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ public function parse(string $url): ?array
2727
return $cached;
2828
}
2929

30+
$endpoint = $this->getEndpointUrl($url);
31+
if ($endpoint === null) {
32+
return null;
33+
}
34+
3035
$data = $this->fetch(
31-
$this->getEndpointUrl($url),
36+
$endpoint,
3237
compact('url')
3338
);
3439

0 commit comments

Comments
 (0)