aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-02-21 18:19:50 +0000
committerStruan Donald <struan@exo.org.uk>2013-02-21 18:19:50 +0000
commit4fbce4ac82ff996b7dcbab67a7ad63f313a4ff6a (patch)
treead3e4e34b31535bc375b43e41afed37da0ce2fbf
parenteac53ee0cc0b3bb4ff581e649abe69f7bc36c827 (diff)
check that there is something in extra before asking for the public response to prevent 500 error if no extra
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index d26ec8ca3..a0bcdb4d0 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -93,7 +93,7 @@ sub updates_as_hashref {
$hashref->{update_pp} = $self->prettify_dt( $problem->lastupdate );
if ( $problem->state eq 'fixed - council' ) {
- $hashref->{details} = FixMyStreet::App::View::Web->add_links( $ctx, $problem->extra->{public_response} );
+ $hashref->{details} = FixMyStreet::App::View::Web->add_links( $ctx, $problem->extra ? $problem->extra->{public_response} : '' );
} elsif ( $problem->state eq 'closed' ) {
$hashref->{details} = sprintf( _('Assigned to %s'), $problem->body($ctx)->name );
}