Skip to content

Commit

Permalink
Do not check all connection properties when DB_CONNECTION=sqlite*
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Aug 18, 2023
1 parent 19ae33f commit bf85146
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Ease/Shared.php
Expand Up @@ -68,6 +68,12 @@ public static function init($configKeys = [], $envFile = '.env')
\Ease\Shared::singleton()->loadConfig($envFile, true);
}
$configured = true;
if(strstr($configKeys['DB_CONNECTION'],'sqlite')){
unset($configKeys['DB_PASSWORD']);
unset($configKeys['DB_USERNAME']);
unset($configKeys['DB_HOST']);
unset($configKeys['DB_PORT']);
}
foreach ($configKeys as $cfgKey) {
if (empty(Functions::cfg($cfgKey))) {
fwrite(STDERR, 'Requied configuration ' . $cfgKey . " is not set." . PHP_EOL);
Expand Down

0 comments on commit bf85146

Please sign in to comment.