From: Frédéric Buclin Date: Sat, 10 Mar 2012 15:05:44 +0000 (+0100) Subject: Bug 731163: Search.pm can use undefined alias in ORDER BY clause X-Git-Tag: bugzilla-4.2.1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b9670ae00c5a5510309ac5aaa548f630694d1e0;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 736b1af6f3..89bb92f19a 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -809,7 +809,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->_input_order_columns ]; + push(@{ $self->{extra_columns} }, $self->_input_order_columns); return @{ $self->{extra_columns} }; }