salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

Fix #10375 - Upgradewizard double commit #10375

Closed JanSiero closed 1 month ago

JanSiero commented 3 months ago

This PR fixes an issue that "commit" is called twice when runing the upgradewizard caused by changes in: https://github.com/salesagility/SuiteCRM/commit/890e5997a02666b925623cd53b99a81609fa481d#diff-7c5c0ada659df5cc72d508d4b597f1882ede2ee19a4a243010a84b9a3a8b4213

Description

The changes in the said commit introduce the variable $additionalStep in modules/Upgradewizard/index.php This variable is initalized in line 509, but already used before in line 297 without initialization. This causes the commit.php to be executed twice.

Motivation and Context

As commit.php is secured to not run its logic twice, this bug does not have any implications for now, however future changes might cause an issue here.

How To Test This

Expected result commit.php is only called once

Observed behaviour the file upgradewizard.log shows two entries of the line "[At commit.php]" This can also be verified by debugger.

Types of changes

Final checklist

serhiisamko091184 commented 3 months ago

Hello @JanSiero,

Thanks for your contribution!

Regards, Serhii