summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Localconfig.pm5
-rw-r--r--Bugzilla/Install/Requirements.pm5
2 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index 3ce12207e..1ee7aca67 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -245,7 +245,8 @@ sub update_localconfig {
# Move any custom or old variables into a separate file.
if (scalar @old_vars) {
my $filename_old = "$filename.old";
- open(my $old_file, ">>$filename_old") || die "$filename_old: $!";
+ open(my $old_file, ">>:utf8", $filename_old)
+ or die "$filename_old: $!";
local $Data::Dumper::Purity = 1;
foreach my $var (@old_vars) {
print $old_file Data::Dumper->Dump([$localconfig->{$var}],
@@ -259,7 +260,7 @@ sub update_localconfig {
}
# Re-write localconfig
- open(my $fh, ">$filename") || die "$filename: $!";
+ open(my $fh, ">:utf8", $filename) or die "$filename: $!";
foreach my $var (LOCALCONFIG_VARS) {
my $name = $var->{name};
my $desc = install_string("localconfig_$name", { root => ROOT_USER });
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index 8825eb3a7..ef4bf3d22 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -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) {