Skip to content

Commit 9304443

Browse files
committed
fix: php warning
1 parent 6dc45dd commit 9304443

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ function plugin_formcreator_getSchemaPath(string $version = null): ?string {
520520
function plugin_formcreator_savePreviousVersion(): void {
521521
$plugin = new Plugin();
522522
$plugin->getFromDBbyDir('formcreator');
523-
$oldVersion = $plugin->fields['version'];
524-
if ($oldVersion != PLUGIN_FORMCREATOR_VERSION) {
523+
$oldVersion = $plugin->fields['version'] ?? null;
524+
if ($oldVersion !== null && $oldVersion != PLUGIN_FORMCREATOR_VERSION) {
525525
Config::setConfigurationValues('formcreator', [
526526
'previous_version' => $oldVersion,
527527
]);

0 commit comments

Comments
 (0)