summaryrefslogtreecommitdiff
path: root/includes/install_upgrade.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/install_upgrade.php')
-rwxr-xr-xincludes/install_upgrade.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/install_upgrade.php b/includes/install_upgrade.php
index 2907c18..3fce5bd 100755
--- a/includes/install_upgrade.php
+++ b/includes/install_upgrade.php
@@ -13,6 +13,12 @@ $errors = $success = [];
$gBitInstaller->loadAllUpgradeFiles();
if( !empty( $_REQUEST['upgrade_packages'] )) {
+ // install_packages.php creates $gBitInstallDb but that runs in a previous request.
+ // Re-establish the connection here for the upgrade step.
+ if( empty( $gBitInstallDb ) ) {
+ $gBitInstallDb = ADONewConnection( $gBitDbType );
+ $gBitInstallDb->Connect( $gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbType != 'pdo' ? $gBitDbName : null );
+ }
if( !empty( $gDebug ) || !empty( $_REQUEST['debug'] ) ) {
$gBitInstallDb->debug = 99;
}