Skip to content

Commit

Permalink
Merge pull request #175 from VanOns/fix/oembed-service
Browse files Browse the repository at this point in the history
[Fix] Prevent fetching if endpoint was not found
  • Loading branch information
mauricewijnia committed Jan 24, 2023
2 parents 26d1dd2 + 6eedbb1 commit bdc23df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Services/OEmbedService.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ public function parse(string $url): ?array
return $cached;
}

$endpoint = $this->getEndpointUrl($url);
if ($endpoint === null) {
return null;
}

$data = $this->fetch(
$this->getEndpointUrl($url),
$endpoint,
compact('url')
);

Expand Down

0 comments on commit bdc23df

Please sign in to comment.