madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21941: LJSUP-12148: JSON-RPC

Committer: sbelyaev
LJSUP-12148: JSON-RPC
U   trunk/cgi-bin/LJ/JSON/RPC.pm
Modified: trunk/cgi-bin/LJ/JSON/RPC.pm
===================================================================
--- trunk/cgi-bin/LJ/JSON/RPC.pm	2012-05-14 07:10:02 UTC (rev 21940)
+++ trunk/cgi-bin/LJ/JSON/RPC.pm	2012-05-14 07:47:07 UTC (rev 21941)
@@ -78,9 +78,15 @@
         $resp_data = $item->response($items->{'result'});
     }
 
-    my $response = LJ::Response::JSON->new();
-    $response->data($resp_data);
-    return $response;
+    if ($resp_data) {
+        my $response = LJ::Response::JSON->new();
+        $response->data($resp_data);
+        return $response;
+    } else {
+        my $response = LJ::Response->new();
+        return $response;
+        
+    }
 }
 
 1;

Tags: livejournal, madeon, pm, sbelyaev
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