Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17089: Bugfix: removing 'my = ... if' statemen...

Committer: gariev
Bugfix: removing 'my = ... if' statement
U   trunk/cgi-bin/communitylib.pl
Modified: trunk/cgi-bin/communitylib.pl
===================================================================
--- trunk/cgi-bin/communitylib.pl	2010-08-05 07:22:20 UTC (rev 17088)
+++ trunk/cgi-bin/communitylib.pl	2010-08-05 08:58:14 UTC (rev 17089)
@@ -156,8 +156,11 @@
 
     # valid invite.  let's accept it as far as the community listing us goes.
     # 1, 0 means add comm to user's friends list, but don't auto-add P edge.
-    my $ret = LJ::join_community($u, $cu, 1, 0) if $args->{member};
-    return undef unless $ret;
+    if ($args->{'member'}) {
+        if (!LJ::join_community($u, $cu, 1, 0)) {
+            return LJ::error("Can't call LJ::join_community($u->{user}, $cu->{user})");
+        }
+    }
 
     # now grant necessary abilities
     my %edgelist = (

Tags: gariev, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments