diff options
Diffstat (limited to 'src/java/com/juick/http/www/RootRedirects.java')
-rw-r--r-- | src/java/com/juick/http/www/RootRedirects.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/RootRedirects.java b/src/java/com/juick/http/www/RootRedirects.java index d4e17972..21b0077e 100644 --- a/src/java/com/juick/http/www/RootRedirects.java +++ b/src/java/com/juick/http/www/RootRedirects.java @@ -31,7 +31,11 @@ public class RootRedirects { protected void doGetPostID(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String strID = request.getRequestURI().substring(1); - int mid = Integer.parseInt(strID); + int mid = 0; + try { + mid = Integer.parseInt(strID); + } catch (NumberFormatException e) { + } if (mid > 0) { com.juick.User author = com.juick.server.MessagesQueries.getMessageAuthor(sql, mid); if (author != null) { |