aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-23 12:23:46 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-23 12:23:46 +0100
commit81c542caf4819268bb6b3cb5c1a445f8e5a10b04 (patch)
tree5b1e7a3a3444cd9a24706d9211c2bc5707ea6f08 /perllib/FixMyStreet/App/Controller/Report.pm
parent32ff76afda2411410c28b36055ba01ab7ded248d (diff)
Use update user centrally.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index f732b94f1..6c14f33fb 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -60,9 +60,9 @@ sub load_problem_or_display_error : Private {
my ( $self, $c, $id ) = @_;
# try to load a report if the id is a number
- my $problem #
- = $id =~ m{\D} # is id non-numeric?
- ? undef # ...don't even search
+ my $problem
+ = ( !$id || $id =~ m{\D} ) # is id non-numeric?
+ ? undef # ...don't even search
: $c->cobrand->problems->find( { id => $id } );
# check that the problem is suitable to show.