[Rt-commit] rtir branch, 4.0.1-releng, updated. 4.0.1rc1-1-g1eadb5b

Shawn Moore shawn at bestpractical.com
Thu Aug 3 15:33:19 EDT 2017


The branch, 4.0.1-releng has been updated
       via  1eadb5ba5d67f69e53430a97173ea7387e4c454b (commit)
      from  9d2454204588f9162876a97c7b9e2be2a2163283 (commit)

Summary of changes:
 html/RTIR/Tools/Elements/ToolResultsWhois | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 1eadb5ba5d67f69e53430a97173ea7387e4c454b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Aug 3 14:45:46 2017 -0400

    Confirm TicketObj is defined before checking for queue whois server
    
    The lookup page can be accessed directly from the Tools > Lookup menu,
    in which case it won't have a TicketObj. This caused an error when
    RunWhoisRequestByDefault was enabled. Check for a TicketObj before
    looking for a possible queue-level whois configuration.

diff --git a/html/RTIR/Tools/Elements/ToolResultsWhois b/html/RTIR/Tools/Elements/ToolResultsWhois
index 2e7dc96..3660cc5 100644
--- a/html/RTIR/Tools/Elements/ToolResultsWhois
+++ b/html/RTIR/Tools/Elements/ToolResultsWhois
@@ -137,7 +137,12 @@ $server => undef
 $WhoisServer = $server unless defined $WhoisServer;
 unless ($WhoisServer) {
     return unless RT->Config->Get('RunWhoisRequestByDefault');
-    $WhoisServer = $TicketObj->QueueObj->FirstCustomFieldValue('RTIR default WHOIS server') || RT::IR->FirstWhoisServer;
+
+    $WhoisServer = RT::IR->FirstWhoisServer;
+
+    if ( $TicketObj and $TicketObj->QueueObj->FirstCustomFieldValue('RTIR default WHOIS server') ){
+        $WhoisServer = $TicketObj->QueueObj->FirstCustomFieldValue('RTIR default WHOIS server');
+    }
 }
 
 return unless $q;

-----------------------------------------------------------------------


More information about the rt-commit mailing list