From 8b3ad446036177f480e3027af97cab67ce546364 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Sun, 10 Jun 2018 20:32:57 +0000
Subject: [PATCH] Fix static calls to non-static getLanguage()

---
 modules/core/www/frontpage_federation.php | 2 +-
 modules/multiauth/www/selectsource.php    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/core/www/frontpage_federation.php b/modules/core/www/frontpage_federation.php
index be0bcb3e6..658147dca 100644
--- a/modules/core/www/frontpage_federation.php
+++ b/modules/core/www/frontpage_federation.php
@@ -96,7 +96,7 @@ foreach ($metaentries['remote'] as $key => $value) {
 
 $t = new \SimpleSAML\XHTML\Template($config, 'core:frontpage_federation.tpl.php');
 
-$language = \SimpleSAML\Locale\Language::getLanguage();
+$language = $t->getTranslator()->getLanguage()->getLanguage();
 $defaultLanguage = $config->getString('language.default', 'en');
 
 $translators = array(
diff --git a/modules/multiauth/www/selectsource.php b/modules/multiauth/www/selectsource.php
index 79ceef925..1a8d141f9 100644
--- a/modules/multiauth/www/selectsource.php
+++ b/modules/multiauth/www/selectsource.php
@@ -51,7 +51,7 @@ $globalConfig = \SimpleSAML\Configuration::getInstance();
 $t = new \SimpleSAML\XHTML\Template($globalConfig, 'multiauth:selectsource.php');
 
 $defaultLanguage = $globalConfig->getString('language.default', 'en');
-$language = \SimpleSAML\Locale\Language::getLanguage();
+$language = $t->getTranslator()->getLanguage()->getLanguage();
 
 $sources = $state[\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::SOURCESID];
 foreach ($sources as $key => $source){
-- 
GitLab