Skip to content
Snippets Groups Projects

Issue #3356052: KeyProviderInterface::getKeyValue() doesn't always return a string

Files
2
@@ -92,7 +92,7 @@ class EnvKeyProvider extends KeyProviderBase implements KeyPluginFormInterface {
/**
* {@inheritdoc}
*/
public function getKeyValue(KeyInterface $key) {
public function getKeyValue(KeyInterface $key): ?string {
$env_variable = $this->configuration['env_variable'];
$key_value = getenv($env_variable);
@@ -108,7 +108,7 @@ class EnvKeyProvider extends KeyProviderBase implements KeyPluginFormInterface {
$key_value = base64_decode($key_value);
}
return $key_value;
return (string) $key_value;
}
}
Loading