diff --git a/controllers/admin/AdminSelfUpgradeController.php b/controllers/admin/AdminSelfUpgradeController.php index 69c14d331..75f577adb 100644 --- a/controllers/admin/AdminSelfUpgradeController.php +++ b/controllers/admin/AdminSelfUpgradeController.php @@ -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_;