aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2007-03-09 16:56:51 +0000
committermatthew <matthew>2007-03-09 16:56:51 +0000
commit1f630b69c22390023ccf9b19d9752da7ac0eb632 (patch)
tree661ff868faf7781b6f4918486af6079c09b91029
parent0d44f1c3607809b56e0d1d14573bf62632268c4d (diff)
NI error has an undef here.
-rwxr-xr-xweb/index.cgi6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/index.cgi b/web/index.cgi
index 761e09d23..af50b7d7a 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: index.cgi,v 1.91 2007-03-09 13:13:50 matthew Exp $
+# $Id: index.cgi,v 1.92 2007-03-09 16:56:51 matthew Exp $
# TODO
# Nothing is done about the update checkboxes - not stored anywhere on anything!
@@ -749,8 +749,8 @@ sub geocode {
$y -= 1 if ($yy - $y < 0.5);
} catch RABX::Error with {
my $e = shift;
- if ($e->value() == mySociety::MaPit::BAD_POSTCODE
- || $e->value() == mySociety::MaPit::POSTCODE_NOT_FOUND) {
+ if ($e->value() && ($e->value() == mySociety::MaPit::BAD_POSTCODE
+ || $e->value() == mySociety::MaPit::POSTCODE_NOT_FOUND)) {
$error = 'That postcode was not recognised, sorry.';
} else {
$error = $e;