mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-08-18 04:07 pm

[dw-free] Network page errors out when user has friends who aren't in memcache

[commit: http://hg.dwscoalition.org/dw-free/rev/d0b3ec04278c]

http://bugs.dwscoalition.org/show_bug.cgi?id=1625

Network page requires memcache, but shouldn't die if someone isn't
memcached.

Patch by [personal profile] afuna.

Files modified:
  • cgi-bin/DW/Logic/LogItems.pm
--------------------------------------------------------------------------------
diff -r 5e1058897fcf -r d0b3ec04278c cgi-bin/DW/Logic/LogItems.pm
--- a/cgi-bin/DW/Logic/LogItems.pm	Tue Aug 18 15:19:45 2009 +0000
+++ b/cgi-bin/DW/Logic/LogItems.pm	Tue Aug 18 16:07:31 2009 +0000
@@ -97,7 +97,7 @@ sub watch_items
         # delete u objects based on 'showtypes'
         foreach my $fid ( keys %$friends_u ) {
             my $fu = $friends_u->{$fid};
-            if ( ! $fu->is_visible ||
+            if ( ! $fu || ! $fu->is_visible ||
                  $valid_types && index(uc($valid_types), $fu->{journaltype}) == -1 )
             {
                 delete $friends_u->{$fid};
--------------------------------------------------------------------------------