Skip to content

Commit

Permalink
fix: New version warning incorrectly showed when using the latest
Browse files Browse the repository at this point in the history
  • Loading branch information
live627 committed Nov 24, 2024
1 parent 75bae34 commit 1b980bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/CustomForm/ManageCustomForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ public function ModifySettings(): void
if ($data !== null)
{
$data = json_decode($data, true);
require_once $this->sourcedir . '/Subs-Package.php';
if ($data !== null && compareVersions(self::VERSION, $data[0]['version']['string']) < 1)
$v1 = Version::fromString(self::VERSION);
$v2 = Version::fromString($data[0]['version']['string']);

if ($data !== null && $v1->getMajor() === $v2->getMajor() && $v1->compareTo($v2) === -1)
{
$changes = '';
foreach ($data[1]['changes'] as $type => $change)
Expand Down Expand Up @@ -1013,4 +1015,4 @@ public function getFormFromField(int $field_id): int

return (int) $id_form;
}
}
}

0 comments on commit 1b980bb

Please sign in to comment.