From 99dc25bccf7b413c078a82e8096333fa547f4564 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 18 Dec 2023 17:22:40 +0800 Subject: [PATCH] * Fix an error, if there are files to be deleted, fromVersion is undefined. --- module/upgrade/control.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/upgrade/control.php b/module/upgrade/control.php index a58b9698de..2d2932f7a4 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -147,7 +147,8 @@ class upgrade extends control session_write_close(); $this->session->set('step', ''); - $this->view->title = $this->lang->upgrade->result; + $this->view->title = $this->lang->upgrade->result; + $this->view->fromVersion = $fromVersion; $result = $this->upgrade->deleteFiles(); if($result) @@ -231,9 +232,8 @@ class upgrade extends control $this->locate(inlink('afterExec', "fromVersion=$fromVersion")); } - $this->view->result = 'sqlFail'; - $this->view->fromVersion = $fromVersion; - $this->view->errors = $this->upgrade->getError(); + $this->view->result = 'sqlFail'; + $this->view->errors = $this->upgrade->getError(); $this->display(); }