Skip to content
Snippets Groups Projects
Commit a6c98e79 authored by Artem Honcharov's avatar Artem Honcharov Committed by Jeroen Tubex
Browse files

Issue #3369148 by Skymen, JeroenT: Typo in 'currrentUser' give error 'Creation...

Issue #3369148 by Skymen, JeroenT: Typo in 'currrentUser' give error 'Creation of dynamic property is deprecated'
parent fba26fcf
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface { ...@@ -78,7 +78,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface {
if ($this->domain) { if ($this->domain) {
foreach ($names as $name) { foreach ($names as $name) {
if ($name == 'system.site' && !$this->currrentUser->hasPermission('bypass language restrictions')) { if ($name == 'system.site' && !$this->currentUser->hasPermission('bypass language restrictions')) {
$overrider = \Drupal::service('domain_config.overrider'); $overrider = \Drupal::service('domain_config.overrider');
$configs = $overrider->loadOverrides([$name]); $configs = $overrider->loadOverrides([$name]);
...@@ -87,7 +87,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface { ...@@ -87,7 +87,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface {
$overrides[$name] = $configs[$name]; $overrides[$name] = $configs[$name];
} }
} }
elseif ($name == 'language.negotiation' && !$this->currrentUser->hasPermission('bypass language restrictions')) { elseif ($name == 'language.negotiation' && !$this->currentUser->hasPermission('bypass language restrictions')) {
$languages = \Drupal::config('domain.language.' . $this->domain->getOriginalId() . '.' . $name)->get( $languages = \Drupal::config('domain.language.' . $this->domain->getOriginalId() . '.' . $name)->get(
'languages' 'languages'
); );
...@@ -163,7 +163,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface { ...@@ -163,7 +163,7 @@ class DomainLanguageOverrider implements ConfigFactoryOverrideInterface {
*/ */
protected function initiateContext() { protected function initiateContext() {
$this->contextSet = TRUE; $this->contextSet = TRUE;
$this->currrentUser = \Drupal::service('current_user'); $this->currentUser = \Drupal::service('current_user');
$this->domainNegotiator = \Drupal::service('domain.negotiator'); $this->domainNegotiator = \Drupal::service('domain.negotiator');
// Get the domain context. // Get the domain context.
$this->domain = $this->domainNegotiator->getActiveDomain(); $this->domain = $this->domainNegotiator->getActiveDomain();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment