Skip to content

Commit

Permalink
Proper handle for sqlite on init
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Nov 8, 2023
1 parent 6256cb4 commit 9d1cc02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Ease/Shared.php
Expand Up @@ -76,10 +76,10 @@ public static function init($configKeys = [], $envFile = '', $exit = true)
}
$configured = true;
if ((array_search('DB_CONNECTION', $configKeys) !== false) && preg_match('/^sqlite/', self::cfg('DB_CONNECTION', ''))) {
unset($configKeys['DB_PASSWORD']);
unset($configKeys['DB_USERNAME']);
unset($configKeys['DB_HOST']);
unset($configKeys['DB_PORT']);
unset($configKeys[array_search('DB_PASSWORD', $configKeys)]);
unset($configKeys[array_search('DB_USERNAME', $configKeys)]);
unset($configKeys[array_search('DB_HOST', $configKeys)]);
unset($configKeys[array_search('DB_PORT', $configKeys)]);
}
foreach ($configKeys as $cfgKey) {
if (empty(self::cfg($cfgKey))) {
Expand Down

0 comments on commit 9d1cc02

Please sign in to comment.