Commit e6554bb6 authored by Nivetha Subramaniyan's avatar Nivetha Subramaniyan Committed by Stephan Zeidler
Browse files

Issue #3321318 by NivethaSubramaniyan, queenvictoria, szeidler: WSOD on...

Issue #3321318 by NivethaSubramaniyan, queenvictoria, szeidler: WSOD on /admin/config/media/media-fotoweb after installation (a different issue)
parent 92d799e3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\media_fotoweb\OAuth2\Persistence\ApiTokenPersistence;
use Drupal\media_fotoweb\OAuth2\Persistence\UserTokenPersistence;
use kamermans\OAuth2\OAuth2Handler;
use Psr\Container\ContainerInterface;

/**
 * FotowebClient for configuration of client in fotoweb.
@@ -103,6 +102,14 @@ class FotowebClient {
      }
      $configuration['persistenceProvider'] = $tokenPersistence;
    }
    // If we don't have a server yet we can't create a client.
    if (!$configuration['baseUrl']) {
      \Drupal::messenger()->addMessage(
        $this->t("Until a server is added we can't create the configuration."),
        'warning'
      );
      return;
    }
    $this->setConfiguration($configuration);
    $this->client = new FotowebAPIClient($configuration);
  }