File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
lib/internal/Magento/Framework/Lock/Backend
setup/src/Magento/Setup/Model/ConfigOptionsList Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ private function addPrefix(string $name): string
162
162
*/
163
163
private function getPrefix (): string
164
164
{
165
- if ($ this ->prefix === null || $ this -> prefix === '' ) {
165
+ if ($ this ->prefix === null ) {
166
166
$ this ->prefix = (string )$ this ->deploymentConfig ->get (
167
167
ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTION_DEFAULT
168
168
. '/ '
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ class Lock implements ConfigOptionsListInterface
134
134
*/
135
135
private $ defaultConfigValues = [
136
136
self ::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB ,
137
- self ::INPUT_KEY_LOCK_DB_PREFIX => null ,
138
137
self ::INPUT_KEY_LOCK_ZOOKEEPER_PATH => ZookeeperLock::DEFAULT_PATH ,
139
138
];
140
139
@@ -317,7 +316,10 @@ private function setDefaultConfiguration(
317
316
string $ lockProvider
318
317
) {
319
318
foreach ($ this ->mappingInputKeyToConfigPath [$ lockProvider ] as $ input => $ path ) {
320
- $ configData ->set ($ path , $ deploymentConfig ->get ($ path , $ this ->getDefaultValue ($ input )));
319
+ // do not set default value null for lock db prefix
320
+ if ($ input !== self ::INPUT_KEY_LOCK_DB_PREFIX ) {
321
+ $ configData ->set ($ path , $ deploymentConfig ->get ($ path , $ this ->getDefaultValue ($ input )));
322
+ }
321
323
}
322
324
323
325
return $ configData ;
@@ -333,10 +335,6 @@ private function setDefaultConfiguration(
333
335
*/
334
336
private function getDefaultValue (string $ inputKey )
335
337
{
336
- if (isset ($ this ->defaultConfigValues [$ inputKey ])) {
337
- return $ this ->defaultConfigValues [$ inputKey ];
338
- } else {
339
- return null ;
340
- }
338
+ return $ this ->defaultConfigValues [$ inputKey ] ?? null ;
341
339
}
342
340
}
You can’t perform that action at this time.
0 commit comments