diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Hackney.pm | 6 |
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 { |