From b6caeda56782b0cea6892f8531feab67636e6029 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" Date: Tue, 21 Feb 2006 14:36:42 +0000 Subject: [PATCH] Patch for bug 287325: we should use scalar instead of length for finding out how many elements an array has; patch by me, r=justdave on IRC, fixing tree. --- webtools/bugzilla/Bugzilla/Bug.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Bug.pm b/webtools/bugzilla/Bugzilla/Bug.pm index 22f62f1864f..290c4e7ca82 100644 --- a/webtools/bugzilla/Bugzilla/Bug.pm +++ b/webtools/bugzilla/Bugzilla/Bug.pm @@ -128,7 +128,7 @@ sub initBug { $self->{'who'} = new Bugzilla::User($user_id); my $custom_fields = ""; - if (length(Bugzilla->custom_field_names) > 0) { + if (scalar(Bugzilla->custom_field_names) > 0) { $custom_fields = ", " . join(", ", Bugzilla->custom_field_names); } @@ -742,7 +742,6 @@ sub AppendComment { $dbh->do("UPDATE bugs SET delta_ts = ? WHERE bug_id = ?", undef, $timestamp, $bugid); } - # This method is private and is not to be used outside of the Bug class. sub EmitDependList { my ($myfield, $targetfield, $bug_id) = (@_);