Skip to content

Commit

Permalink
Update version_compare message for the upgrade command
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Feb 27, 2024
1 parent 41b53b0 commit b86089f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
exit;
}

// checks current kirby version whether same or higher
if (version_compare($version, $kirby->version(), '<') === true) {
throw new Exception('Current Kirby version is the same or higher than the version you are trying to upgrade to');
// checks current kirby version and prevents downgrade
if (version_compare($kirby->version(), $version, '>') === true) {
throw new Exception('Current Kirby version is higher than the version you are trying to upgrade to');
}

// confirms the process when major version upgrade available
Expand Down

0 comments on commit b86089f

Please sign in to comment.