Browse Source

Fix deprecated File::url(), use createFileUrl() instead (#855)

* islandora.tokens.inc
* See https://www.drupal.org/node/3019830
Co-authored-by: Ant Brown <ant@catalyst.net.nz>
pull/928/head
Ant Brown 2 years ago committed by GitHub
parent
commit
2794f01164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      islandora.tokens.inc

2
islandora.tokens.inc

@ -79,7 +79,7 @@ function islandora_tokens($type, $tokens, array $data, array $options, Bubbleabl
if ($media) { if ($media) {
$file = \Drupal::service('islandora.media_source_service')->getSourceFile($media); $file = \Drupal::service('islandora.media_source_service')->getSourceFile($media);
if (!empty($file)) { if (!empty($file)) {
$url = $file->url(); $url = $file->createFileUrl();
$replacements[$original] = $url; $replacements[$original] = $url;
} }
} }

Loading…
Cancel
Save