From b86089f9d4b42119a883a029bd1767b33ef1b185 Mon Sep 17 00:00:00 2001 From: Ahmet Bora Date: Tue, 27 Feb 2024 15:17:06 +0300 Subject: [PATCH] Update version_compare message for the upgrade command --- commands/upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/upgrade.php b/commands/upgrade.php index 7559757..e12c2a7 100644 --- a/commands/upgrade.php +++ b/commands/upgrade.php @@ -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