aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Roles/ConfirmValidation.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Roles/ConfirmValidation.pm')
-rw-r--r--perllib/FixMyStreet/Roles/ConfirmValidation.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Roles/ConfirmValidation.pm b/perllib/FixMyStreet/Roles/ConfirmValidation.pm
index 776230287..6474c94d1 100644
--- a/perllib/FixMyStreet/Roles/ConfirmValidation.pm
+++ b/perllib/FixMyStreet/Roles/ConfirmValidation.pm
@@ -24,7 +24,7 @@ sub report_validation {
$errors->{name} = sprintf( _('Names are limited to %d characters in length.'), 50 );
}
- if ( length( $report->user->phone ) > 20 ) {
+ if ( $report->user->phone && length( $report->user->phone ) > 20 ) {
$errors->{phone} = sprintf( _('Phone numbers are limited to %s characters in length.'), 20 );
}