kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-07-17 03:57 pm

[dw-free] Find Similar Interests tool dies when user logged out

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

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

Make sure $remote is set before using can_find_similar method.

Patch by [personal profile] kareila.

Files modified:
  • htdocs/interests.bml
--------------------------------------------------------------------------------
diff -r e7c9a1c30739 -r 1caed5101568 htdocs/interests.bml
--- a/htdocs/interests.bml	Sat Jul 17 10:33:42 2010 -0500
+++ b/htdocs/interests.bml	Sat Jul 17 10:57:34 2010 -0500
@@ -141,7 +141,7 @@ body<=
     if (!$did_post && $GET{'mode'} eq "findsim_do") {
         return $ML{'error.tempdisabled'} unless LJ::is_enabled('interests-findsim');
 
-        return $ML{'.findsim_do.account.notallowed'} unless $remote->can_find_similar;
+        return $ML{'.findsim_do.account.notallowed'} unless $remote && $remote->can_find_similar;
 
         my $ret = "";
         my $u = LJ::load_user($GET{'user'});
--------------------------------------------------------------------------------