aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-08-28 17:56:04 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-08-28 17:56:04 +0100
commitaf317bf3ade4694ede7a4d8d163929b8576c7bdd (patch)
tree2979aa48852c4882f8cbddf262d013a14c9a9631
parentf784713cbebb8e9026544ab969a5a3404f736429 (diff)
[Hackney] Do not match non-special destination addresses.
-rw-r--r--perllib/FixMyStreet/Cobrand/Hackney.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Hackney.pm b/perllib/FixMyStreet/Cobrand/Hackney.pm
index 5168805c5..4c035f926 100644
--- a/perllib/FixMyStreet/Cobrand/Hackney.pm
+++ b/perllib/FixMyStreet/Cobrand/Hackney.pm
@@ -188,8 +188,10 @@ sub _split_emails {
my $parts = join '\s*', qw(^ park : (.*?) ; estate : (.*?) ; other : (.*?) $);
my $regex = qr/$parts/i;
- my ($park, $estate, $other) = $email =~ $regex;
- return ($park, $estate, $other);
+ if (my ($park, $estate, $other) = $email =~ $regex) {
+ return ($park, $estate, $other);
+ }
+ return ();
}
sub validate_contact_email {