Skip to content

Commit

Permalink
Fixes #3823 Card Widget Deprecation Notices
Browse files Browse the repository at this point in the history
  • Loading branch information
Troy Dean committed Nov 5, 2024
1 parent 906fe14 commit ebd8a28
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen

// Check and see if there's a valid link to preview.
if ($item->link_title || $item->link_uri) {
if (str_starts_with($item->link_uri, '/' . PublicStream::basePath())) {
if (!empty($item->link_uri) && str_starts_with($item->link_uri, '/' . PublicStream::basePath())) {
// Link to public file: use fromUri() to get the URL.
$link_url = Url::fromUri(urldecode('base:' . $item->link_uri));
}
Expand Down

0 comments on commit ebd8a28

Please sign in to comment.