Skip to content

Commit a15e2f3

Browse files
committed
fix config save pb with encryption key generation
1 parent dcd9a49 commit a15e2f3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
.settings/
33
.project
44
vendor/
5+
.idea/
6+

src/Ubiquity/security/data/EncryptionManager.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* This class is part of Ubiquity
99
*
1010
* @author jc
11-
* @version 1.0.0
11+
* @version 1.0.1
1212
*
1313
*/
1414
class EncryptionManager {
@@ -39,8 +39,10 @@ public static function start(array &$config, ?string $cipher = Encryption::AES12
3939
$key = self::$encryptionInstance->getKey();
4040

4141
if ($oldKey !== $key) {
42-
$config[self::ENCRYPTION_KEY_NAME] = $key;
43-
Startup::saveConfig($config);
42+
$filename = \ROOT . 'config/config.php';
43+
$oConfig = include($filename);
44+
$oConfig[self::ENCRYPTION_KEY_NAME] = $key;
45+
Startup::saveConfig($oConfig);
4446
}
4547
}
4648

0 commit comments

Comments
 (0)