Skip to content

Commit 55f20a0

Browse files
committed
AC-15329::Added try catch block
1 parent 3484247 commit 55f20a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

setup/src/Magento/Setup/Model/ConfigModel.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getAvailableOptions()
6767
/** @var AbstractConfigOption[] $optionCollection */
6868
$optionCollection = [];
6969
$optionLists = $this->collector->collectOptionsLists();
70-
70+
$errors = [];
7171
foreach ($optionLists as $optionList) {
7272
$optionCollection[] = $optionList->getOptions();
7373
}
@@ -77,7 +77,11 @@ public function getAvailableOptions()
7777
foreach ($optionCollection as $option) {
7878
$currentValue = $this->deploymentConfig->get($option->getConfigPath());
7979
if ($currentValue !== null && $option->acceptValue()) {
80-
$option->setDefault($currentValue);
80+
try {
81+
$option->setDefault($currentValue);
82+
} catch (\Throwable $e) {
83+
$errors[] = [$e->getMessage()];
84+
}
8185
}
8286
}
8387

0 commit comments

Comments
 (0)