Skip to content

Commit

Permalink
Merge pull request #832 from M0rgan01/fix-v9-context
Browse files Browse the repository at this point in the history
Improvement for new v9 context
  • Loading branch information
M0rgan01 authored Aug 6, 2024
2 parents f613730 + 5069cba commit 963d837
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 @@ -292,6 +292,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 963d837

Please sign in to comment.