Fixes #2167 Calling polls.php with invalid pid shows sql error instead of correct error page