Commit c30ae869 authored by catch's avatar catch
Browse files

Issue #3240958 by andypost, alexpott:...

Issue #3240958 by andypost, alexpott: template_preprocess_locale_translation_last_check() causes deprecations on PHP 8.1
parent a19e9935
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/locale/locale.pages.inc: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -47,6 +47,6 @@ function template_preprocess_locale_translation_update_info(array &$variables) {
function template_preprocess_locale_translation_last_check(array &$variables) {
  $last = $variables['last'];
  $variables['last_checked'] = ($last != NULL);
  $variables['time'] = \Drupal::service('date.formatter')->formatTimeDiffSince($last);
  $variables['time'] = $variables['last_checked'] ? \Drupal::service('date.formatter')->formatTimeDiffSince($last) : NULL;
  $variables['link'] = Link::fromTextAndUrl(t('Check manually'), Url::fromRoute('locale.check_translation', [], ['query' => \Drupal::destination()->getAsArray()]))->toString();
}