}
use Debbugs::Config qw(:config);
-use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions :utf8);
+use Debbugs::Common qw(:lock buglog :misc get_hashname sort_versions);
+use Debbugs::UTF8;
use Debbugs::Status qw(bug_archiveable :read :hook writebug new_bug splitpackages split_status_fields get_bug_status);
use Debbugs::CGI qw(html_escape);
use Debbugs::Log qw(:misc :write);
if (not @svers) {
@svers = $version;
}
- else {
+ elsif (not grep {$version eq $_} @svers) {
+ # The $version was not equal to one of the source
+ # versions, so it's probably unqualified (or just
+ # wrong). Delete it, and use the source versions
+ # instead.
if (exists $found_versions{$version}) {
delete $found_versions{$version};
$found_removed{$version} = 1;