From: Frédéric Buclin Date: Sat, 10 Mar 2012 14:56:55 +0000 (+0100) Subject: Bug 731163: Search.pm can use undefined alias in ORDER BY clause X-Git-Tag: bugzilla-4.3.1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9f0a3f34b1cc8a7d6c969c69b3b7c849fae22a1;p=thirdparty%2Fbugzilla.git Bug 731163: Search.pm can use undefined alias in ORDER BY clause r=dkl a=LpSolit --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index cc74afb429..a0b11dde46 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -799,7 +799,7 @@ sub _extra_columns { my ($self) = @_; # Everything that's going to be in the ORDER BY must also be # in the SELECT. - $self->{extra_columns} ||= [ $self->_valid_order_columns ]; + push(@{ $self->{extra_columns} }, $self->_valid_order_columns); return @{ $self->{extra_columns} }; }