aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-02 18:05:03 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-06 12:25:34 +0000
commit27f6a53b0be0e36ffccbabd45592ee6fddf0092a (patch)
tree862efd77bf7f519f7a0041da4166c592ed1f9c56
parentc999898402e90480df72e7014e531fa6fb6d9ac2 (diff)
Fix warning in contact test.
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index a50a22ff9..ed9e5bdea 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -55,10 +55,9 @@ sub extra_contact_validation {
$c->stash->{dest} = $c->get_param('dest');
- $errors{dest} = "Please enter who your message is for"
- unless $c->get_param('dest');
-
- if ( $c->get_param('dest') eq 'council' || $c->get_param('dest') eq 'update' ) {
+ if (!$c->get_param('dest')) {
+ $errors{dest} = "Please enter who your message is for";
+ } elsif ( $c->get_param('dest') eq 'council' || $c->get_param('dest') eq 'update' ) {
$errors{not_for_us} = 1;
}