[Rt-commit] [rtir] 02/04: Don't run a query unless something is provided.

Kevin Falcone falcone at bestpractical.com
Mon Jul 15 13:08:58 EDT 2013


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 2.9/bundle-net-whois-ripe
in repository rtir.

commit fec51df52885f8f266e977d0b67962aa46ba2cc6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Jul 15 11:56:15 2013 -0400

    Don't run a query unless something is provided.
    
    Without this, you get a misleading "Couldn't connect to whois server"
    when loading the Tools page with RunWhoisRequestByDefault on, or if you
    click Go without entering a value.
---
 html/RTIR/Tools/Elements/ToolResultsWhois | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/html/RTIR/Tools/Elements/ToolResultsWhois b/html/RTIR/Tools/Elements/ToolResultsWhois
index aa86677..f3780fb 100644
--- a/html/RTIR/Tools/Elements/ToolResultsWhois
+++ b/html/RTIR/Tools/Elements/ToolResultsWhois
@@ -116,6 +116,8 @@ unless ($WhoisServer) {
     $WhoisServer = RT::IR->FirstWhoisServer;
 }
 
+return unless $q;
+
 my ($WhoisIterator, $WhoisError) = RT::IR->WhoisLookup(
     Server => $WhoisServer,
     Query => $q,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Rt-commit mailing list