X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flocale%2Flocale.batch.inc;fp=web%2Fcore%2Fmodules%2Flocale%2Flocale.batch.inc;h=b509c2542b55f77616c1b575d24cde03558986ed;hp=7edc85d676a17a201b8c24541da163a9962341a6;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/locale/locale.batch.inc b/web/core/modules/locale/locale.batch.inc index 7edc85d67..b509c2542 100644 --- a/web/core/modules/locale/locale.batch.inc +++ b/web/core/modules/locale/locale.batch.inc @@ -238,11 +238,13 @@ function locale_translation_http_check($uri) { $logger = \Drupal::logger('locale'); try { $actual_uri = NULL; - $response = \Drupal::service('http_client_factory')->fromOptions(['allow_redirects' => [ - 'on_redirect' => function(RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) { - $actual_uri = (string) $request_uri; - } - ]])->head($uri); + $response = \Drupal::service('http_client_factory')->fromOptions([ + 'allow_redirects' => [ + 'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) { + $actual_uri = (string) $request_uri; + } + ], + ])->head($uri); $result = []; // Return the effective URL if it differs from the requested.