diff --git a/captcha.install b/captcha.install index 45da77c..1a15483 100755 --- a/captcha.install +++ b/captcha.install @@ -173,7 +173,8 @@ if (!empty($entity_ids) && is_array($entity_ids)) { * Handle and delete "add_captcha_description". */ function captcha_update_8903(&$sandbox) { - $config = \Drupal::config('captcha.settings'); + $config_factory = \Drupal::configFactory(); + $config = $config_factory->getEditable('captcha.settings'); $addDescription = $config->get('add_captcha_description'); // If description was disabled before, set 'description' to an empty string, // so it is disabled again in the newest version: @@ -181,5 +182,5 @@ function captcha_update_8903(&$sandbox) { $config->set('description', '')->save(); } // Delete old config: - $config->delete('add_captcha_description')->save(); + $config->clear('add_captcha_description')->save(); }