Skip to content
Snippets Groups Projects
Commit 487b9cfb authored by Shawn Duncan's avatar Shawn Duncan
Browse files

Issue #3347425 by FatherShawn, zerbash: Migration items can be skipped is...

Issue #3347425 by FatherShawn, zerbash: Migration items can be skipped is simple config does not exist.
parent 3e734ca4
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,14 @@ function oauth2_client_post_update_4_0_migrate(): void {
foreach ($plugins as $id => $plugin) {
// Get any stored simple configuration for this plugin.
$config = $configFactory->getEditable('oauth2_client.credentials.' . $id);
$credentialSettings = $config->get('credentials');
if ($config->isNew()) {
// Skip ahead - nothing to migrate.
continue;
}
// Get the corresponding config entity.
$entity = $oauth2ClientStorage->load($id);
if ($entity instanceof Oauth2Client) {
$credentialSettings = $config->get('credentials');
// Move the data.
$provider = $credentialSettings['credential_provider'] ?? '';
$storage = $credentialSettings['storage_key'] ?? '';
......
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