Skip to content

Commit

Permalink
fix(install): prevent output in ajax response
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 18, 2022
1 parent f5369f6 commit 1d19d7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,9 @@ public function upgrade(Migration $migration, $args = []): bool {
if ($oldVersion !== null) {
$checkResult = true;
if (version_compare($oldVersion, '2.13.0') >= 0) {
// more strict DB check : dynamic rows, utf8mb4, unsigned int for foreign keys
$checkResult = $this->checkSchema(
$oldVersion,
true,
false,
false,
false,
false,
Expand Down Expand Up @@ -197,12 +196,13 @@ public function upgrade(Migration $migration, $args = []): bool {
return false;
}

ob_start();
while ($fromSchemaVersion && isset($this->upgradeSteps[$fromSchemaVersion])) {
$this->upgradeOneStep($this->upgradeSteps[$fromSchemaVersion]);
$fromSchemaVersion = $this->upgradeSteps[$fromSchemaVersion];
}

$this->migration->executeMigration();

// if the schema contains new tables
$this->installSchema();
$this->configureExistingEntities();
Expand All @@ -211,6 +211,7 @@ public function upgrade(Migration $migration, $args = []): bool {
$this->createCronTasks();
$this->createMiniDashboard();
Config::setConfigurationValues('formcreator', ['schema_version' => PLUGIN_FORMCREATOR_SCHEMA_VERSION]);
ob_get_flush();

if ($this->resyncIssues) {
// An upgrade step requires a resync of the issues
Expand Down

0 comments on commit 1d19d7c

Please sign in to comment.