diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-05-31 15:01:34 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-05-31 15:01:34 +0100 |
commit | 7741bf32d88cfd128416866ca561e797a35266db (patch) | |
tree | 02c17a413f8933d1ec4bc6f1f045e2a1088bb4ee | |
parent | 454a01584b3b9d58b332813f835eae735894f6a1 (diff) |
Fix infinite loop due to accessor being called on each iteration.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index fadee9684..92dbced15 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -280,7 +280,8 @@ sub group_problems : Private { foreach my $row (@{$c->stash->{problems}}) { if (!$row->council) { # Problem was not sent to any council, add to possible councils - while ($row->areas =~ /,($re_councils)(?=,)/g) { + my $areas = $row->areas; + while ($areas =~ /,($re_councils)(?=,)/g) { add_row($row, $1, \%fixed, \%open); } } else { |