Skip to content

Commit

Permalink
fix-v9-context
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Pichat committed Jul 31, 2024
1 parent 7e99c29 commit 5069cba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/admin/AdminSelfUpgradeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ public function init()
parent::init();
}

// V9 context security
// After an upgrade we disconnect the user from the session, and the employee context is null.
if (!$this->context->employee->id) {
return;
}

// For later use, let's set up prodRootDir and adminDir
// This way it will be easier to upgrade a different path if needed
$this->prodRootDir = _PS_ROOT_DIR_;
Expand Down

0 comments on commit 5069cba

Please sign in to comment.