Fixed version comparison failing when comparing Beta and RC versions
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 09:42:41 +0000 (10:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 09:42:41 +0000 (10:42 +0100)
wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php

index b8dd012c6bee0c8f0ea6fc3418f974f66c133635..f280d3998e4db6b893c4e44dc9ce9f75f6a87fb3 100644 (file)
@@ -643,7 +643,7 @@ class PackageUpdateDispatcher extends SingletonFactory {
                                        if (preg_match('~^(\d+\.\d+)\.~', $versionNumber, $matches)) {
                                                $major = $matches[1];
                                                if (isset($highestVersions[$major])) {
-                                                       if (version_compare($highestVersions[$major], $versionNumber, '<')) {
+                                                       if (Package::compareVersion($highestVersions[$major], $versionNumber, '<')) {
                                                                // version is newer, discard current version
                                                                unset($updateData['versions'][$highestVersions[$major]]);
                                                                $highestVersions[$major] = $versionNumber;