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
......@@ -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();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment