[Rt-devel] BUG in ParseQuery ?
Todd Chapman
todd at chaka.net
Wed Nov 9 16:15:54 EST 2005
On Wed, Nov 09, 2005 at 03:34:44PM -0500, Jesse Vincent wrote:
>
>
>
> On Wed, Nov 09, 2005 at 04:01:28PM -0500, Todd Chapman wrote:
> > In Search/Build.html is sub ref ParseQuery with
> > these lines:
> >
> > my $string = shift;
> > my $tree = shift;
> > my @actions = shift;
> > my $want = KEYWORD | PAREN;
> > my $last = undef;
> >
> > Shouldn't @actions be $actions, a ref to an array?
> > The sub goes on to push value onto the arrary but
> > the new values won't be seen outside the sub.
> >
> > If I am correct, it is easy to fix, but then shows
> > shows a deeper bug in the sub.
>
> That looks like a bug. assuming it's being called with an arrayref
Yes, it is. I tried changing it to: my $actions = shift
and changing all the "push @actions ..." to "push @$actions ..."
but then the sub breaks really bad. If you add a custom field
to the query and then do anything that causes parse to run
you get sent to the Advanced page to fix the not really
broken query. Ugly. :)
>
> >
> > -Todd
> >
> > _______________________________________________
> > Rt-devel mailing list
> > Rt-devel at lists.bestpractical.com
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
> >
>
> --
More information about the Rt-devel
mailing list