Skip to content

Commit

Permalink
Fixed bug that restart failed when don't have .env. (#6949)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo authored Jul 13, 2024
1 parent 5fd26c9 commit 4e7ee37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Listener/ReloadDotenvListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public function process(object $event): void
$this->reloadDotenv();
}

protected function reloadDotenv(): void
private function reloadDotenv(): void
{
DotenvManager::reload([BASE_PATH]);
if (file_exists(BASE_PATH . '/.env')) {
DotenvManager::reload([BASE_PATH]);
}
}
}

0 comments on commit 4e7ee37

Please sign in to comment.