diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index f2bb13ae4..3c1480c0f 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -282,7 +282,7 @@ sub group_problems : Private { } } else { # Add to councils it was sent to - foreach ($row->councils) { + foreach (@{ $row->councils }) { next if $c->stash->{council} && $_ != $c->stash->{council}->{id}; add_row($row, $_, \%fixed, \%open); } diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index ab05c3157..f2f130390 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -241,16 +241,16 @@ sub confirm { =head2 councils -Returns an array of councils to which a report was sent. +Returns an arrayref of councils to which a report was sent. =cut sub councils { my $self = shift; - return () unless $self->council; + return [] unless $self->council; (my $council = $self->council) =~ s/\|.*$//; my @council = split( /,/, $council ); - return @council; + return \@council; } =head2 url |