aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2007-08-18 09:58:01 +0000
committermatthew <matthew>2007-08-18 09:58:01 +0000
commit96b6ba2c0e34eaaa398a4d3b2709cbf37ca5b57e (patch)
treef3fc2191612f41be03ebdda3c30e4daa2b28f168
parent8ad2f36dfad7d716db834b4ab405708ebf9c06c3 (diff)
More error avoidances.
-rwxr-xr-xweb/index.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/index.cgi b/web/index.cgi
index 4d56e1eae..df813b66d 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.156 2007-08-17 11:38:07 matthew Exp $
+# $Id: index.cgi,v 1.157 2007-08-18 09:58:01 matthew Exp $
use strict;
require 5.8.0;
@@ -668,6 +668,7 @@ sub display_problem {
$input{y} ||= 0; $input{y} += 0;
# Get all information from database
+ return display_location($q, 'Unknown problem ID') if $input{id} =~ /\D/;
my $problem = dbh()->selectrow_hashref(
"select id, easting, northing, council, category, title, detail, photo,
used_map, name, anonymous, extract(epoch from confirmed) as time,