Skip to content

Commit

Permalink
fix: php warning
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 18, 2022
1 parent 6dc45dd commit 9304443
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ function plugin_formcreator_getSchemaPath(string $version = null): ?string {
function plugin_formcreator_savePreviousVersion(): void {
$plugin = new Plugin();
$plugin->getFromDBbyDir('formcreator');
$oldVersion = $plugin->fields['version'];
if ($oldVersion != PLUGIN_FORMCREATOR_VERSION) {
$oldVersion = $plugin->fields['version'] ?? null;
if ($oldVersion !== null && $oldVersion != PLUGIN_FORMCREATOR_VERSION) {
Config::setConfigurationValues('formcreator', [
'previous_version' => $oldVersion,
]);
Expand Down

0 comments on commit 9304443

Please sign in to comment.