From 7986e991e02c0022cc0eda1e44b55cc8bae17d0c Mon Sep 17 00:00:00 2001
From: abhishek_gupta <abhishek.g@virasatsolutions.com>
Date: Mon, 29 Apr 2024 10:54:41 +0530
Subject: [PATCH] fix the issue

---
 src/Form/SettingsForm.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index fd05625a..835f1ab6 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -132,7 +132,7 @@ class SettingsForm extends ConfigFormBase {
       '#type' => 'select',
       '#options' => $versions,
       '#tree' => TRUE,
-      '#default_value' => $config->get('rest_api_version')['version'],
+      '#default_value' => $config->get('rest_api_version') ? $config->get('rest_api_version')['version'] : NULL,
       '#states' => [
         'visible' => [
           ':input[name="use_latest"]' => ['checked' => FALSE],
-- 
GitLab