Skip to content
Snippets Groups Projects
Commit 31f93e28 authored by catch's avatar catch
Browse files

Issue #3267078 by alexpott, Berdir: Add return typehint to TwigExtension::getFileUrl()

(cherry picked from commit d802bf41)
parent ddf5fc87
Branches
Tags
7 merge requests!2496Issue #3222757 by lauriii, Wim Leers, nod_, rachel_norfolk, itmaybejj,...,!2366Issue #3285105 by Daniel Arend,!2304Issue #3258987: Class "Drupal\Core\Utility\Error" not found in _drupal_error_handler_real() due to bug in PHP 8.1.0-8.1.5,!2148Issue #3270899: Remove Color module from core,!2071Issue #927570: Setting 403 or 404 handler to a page that redirects leads to endless loop,!1975Issue #3269749: losing query params from user to user/login redirect,!1387Draft: Resolve #2511878 "Support enclosure field"
......@@ -281,9 +281,9 @@ public function getLink($text, $url, $attributes = []) {
* @return string
* The file URL.
*/
public function getFileUrl(?string $uri) {
public function getFileUrl(?string $uri): string {
if (is_null($uri)) {
return NULL;
return '';
}
return $this->fileUrlGenerator->generateString($uri);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment