diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index f76ec30..fad317a 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -69,7 +69,9 @@ class InstallStorage extends FileStorage { */ public function __construct($directory = self::CONFIG_INSTALL_DIRECTORY, $collection = StorageInterface::DEFAULT_COLLECTION, ProfileHandlerInterface $profile_handler = NULL) { parent::__construct($directory, $collection); - $this->profileHandler = $profile_handler ?: \Drupal::service('profile_handler'); + if (\Drupal::hasService('profile_handler')) { + $this->profileHandler = $profile_handler ?: \Drupal::service('profile_handler'); + } } /**