[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-126-g9d44bd0

Shawn Moore sartak at bestpractical.com
Wed Oct 6 18:55:01 EDT 2010


The branch, 3.9-trunk has been updated
       via  9d44bd0bac5b60a25034b704a6715e0e37c5af42 (commit)
      from  e3650d932c72daef8f63c8badc760c17d2e4694f (commit)

Summary of changes:
 share/html/Prefs/MyRT.html |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 9d44bd0bac5b60a25034b704a6715e0e37c5af42
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Oct 6 18:58:01 2010 -0400

    Try safeguarding against searches without ->Content
    
        Possible 3.6.x upgrade issue?

diff --git a/share/html/Prefs/MyRT.html b/share/html/Prefs/MyRT.html
index eace895..ab164d2 100644
--- a/share/html/Prefs/MyRT.html
+++ b/share/html/Prefs/MyRT.html
@@ -123,7 +123,16 @@ my @sys_searches;
 for my $object (@objs) {
     for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
         my ($desc, $search) = @$_;
-        my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
+
+        my $SearchType = 'Ticket';
+        if ((ref($search->Content)||'') eq 'HASH') {
+            $SearchType = $search->Content->{'SearchType'}
+                if $search->Content->{'SearchType'};
+        }
+        else {
+            $RT::Logger->debug("Search ".$search->id." ($desc) appears to have no Content");
+        }
+
         if ($object eq $sys && $SearchType eq 'Ticket') {
             push @items, ["system-$desc", $desc];
             push @sys_searches, [$desc, $search];

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


More information about the Rt-commit mailing list