From: lpsolit%gmail.com <> Date: Wed, 25 Apr 2007 04:13:02 +0000 (+0000) Subject: Bug 378672: Use of uninitialized value in numeric comparison (<=>) at Bugzilla/Update... X-Git-Tag: bugzilla-3.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6904fb53591ff509b7d15f25ed6d3af8cbe5949a;p=thirdparty%2Fbugzilla.git Bug 378672: Use of uninitialized value in numeric comparison (<=>) at Bugzilla/Update.pm line 178 - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Update.pm b/Bugzilla/Update.pm index 596290ab9f..f2b17a6b00 100644 --- a/Bugzilla/Update.pm +++ b/Bugzilla/Update.pm @@ -173,8 +173,8 @@ sub _synchronize_data { sub _compare_versions { my ($old_ver, $new_ver) = @_; while (scalar(@$old_ver) && scalar(@$new_ver)) { - my $old = shift(@$old_ver); - my $new = shift(@$new_ver); + my $old = shift(@$old_ver) || 0; + my $new = shift(@$new_ver) || 0; return $new <=> $old if ($new <=> $old); } return scalar(@$new_ver) <=> scalar(@$old_ver);