журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[livejournal] r23412: LJSUP-14471: [Internal] Fix warning Can'...

Committer: nnikulochkina
LJSUP-14471: [Internal] Fix warning Can't call method "dtalkid" on an undefined value at /home/lj/cgi-bin/ljprotocol.pl line 973
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-12-04 08:28:24 UTC (rev 23411)
+++ trunk/cgi-bin/ljprotocol.pl	2012-12-04 08:58:49 UTC (rev 23412)
@@ -835,7 +835,7 @@
     my @comments;
     foreach my $id (@ids) {
         my $comm = LJ::Comment->new($journal, dtalkid => $id);
-        return fail($err, 203, 'xmlrpc.des.no_comment_by_param',{'param'=>'dtalkid'}) unless $comm->dtalkid == $id;
+        return fail($err, 203, 'xmlrpc.des.no_comment_by_param',{'param'=>'dtalkid'}) unless $comm && ($comm->dtalkid == $id);
         return fail($err, 327, 'dtalkid:'.$comm->dtalkid) if $comm->is_deleted;
         return fail($err, 326, 'dtalkid:'.$comm->dtalkid) unless $comm->user_can_delete($u);
 
@@ -970,7 +970,7 @@
     my @comments;
     foreach my $id (@ids) {
         my $comm = LJ::Comment->new($journal, dtalkid => $id);
-        return fail($err, 203, 'xmlrpc.des.no_comment_by_param',{'param'=>'dtalkid'}) unless $comm->dtalkid == $id;
+        return fail($err, 203, 'xmlrpc.des.no_comment_by_param',{'param'=>'dtalkid'}) unless $comm && ($comm->dtalkid == $id);
         return fail($err, 327, 'dtalkid:'.$comm->dtalkid) if $comm->is_deleted;
         return fail($err, 326, 'dtalkid:'.$comm->dtalkid) unless $can_method->($u, $journal, $comm->entry->poster, $comm->poster);
         push @comments, $comm;

Tags: livejournal, nikulochkina, nnikulochkina, 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