Skip to content

Commit

Permalink
fix: add check to log file exist on middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Feb 3, 2025
1 parent 5bb496b commit 34c76c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/Router/Middlewares/UpdateLogExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ class UpdateLogExists extends AbstractMiddleware
{
public function process(): ?string
{
if ($this->upgradeContainer->getLogsState()->getActiveUpdateLogFile() === null) {
$activeUpdateLogFile = $this->upgradeContainer->getLogsState()->getActiveRestoreLogFile();
$activeUpdateLogPath = $this->upgradeContainer->getProperty($this->upgradeContainer::LOGS_PATH) . DIRECTORY_SEPARATOR . $activeUpdateLogFile;

if ($activeUpdateLogFile === null
|| !$this->upgradeContainer->getFileStorage()->exists($activeUpdateLogPath)) {
return Routes::HOME_PAGE;
}

Expand Down

0 comments on commit 34c76c7

Please sign in to comment.