Committer: sbelyaev
LJSUP-12148: JSON-RPCU 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;