]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 678772: version.pm 0.92 and newer forbids negative values, making checksetup...
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 16 Aug 2011 01:44:09 +0000 (03:44 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 16 Aug 2011 01:44:09 +0000 (03:44 +0200)
r/a=mkanat

Bugzilla/Install/Requirements.pm

index 8825eb3a7426aaab522cdb5759bbe88d1d49c781..ef4bf3d22cdb3f98d52544df43a4434f84584f58 100644 (file)
@@ -717,8 +717,9 @@ sub _checking_for {
     # show "ok" or "not found".
     if (exists $params->{found}) {
         my $found_string;
-        # We do a string compare in case it's non-numeric.
-        if ($found and $found eq "-1") {
+        # We do a string compare in case it's non-numeric. We make sure
+        # it's not a version object as negative versions are forbidden.
+        if ($found && !ref($found) && $found eq '-1') {
             $found_string = install_string('module_not_found');
         }
         elsif ($found) {