aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Page.pm3
-rwxr-xr-xweb-admin/index.cgi4
2 files changed, 5 insertions, 2 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index fe6a6e8cb..127fad11b 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -918,6 +918,9 @@ sub mapit_check_error {
return $location->{error};
}
my $island = $location->{coordsyst};
+ if (!$island) {
+ return _("Sorry, that appears to be a Crown dependency postcode, which we don't cover.");
+ }
if ($island eq 'I') {
return _("We do not cover Northern Ireland, I'm afraid, as our licence doesn't include any maps for the region.");
}
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index b7946d600..2868cf2d6 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -309,7 +309,7 @@ sub admin_council_contacts ($$) {
# Example postcode, link to list of problem reports
my $links_html;
my $example_postcode = mySociety::MaPit::call('area/example_postcode', $area_id);
- if ($example_postcode) {
+ if ($example_postcode && ! ref $example_postcode) {
$links_html .= $q->a({ href => mySociety::Config::get('BASE_URL') . '/?pc=' . $q->escape($example_postcode) },
"Example postcode " . $example_postcode) . " | ";
}
@@ -390,7 +390,7 @@ sub admin_council_edit ($$$) {
# Example postcode
my $example_postcode = mySociety::MaPit::call('area/example_postcode', $area_id);
- if ($example_postcode) {
+ if ($example_postcode && ! ref $example_postcode) {
print $q->p("Example postcode: ",
$q->a({ href => mySociety::Config::get('BASE_URL') . '/?pc=' . $q->escape($example_postcode) },
$example_postcode));