[wp-trac] Re: [WordPress Trac] #4533: "Mark as spam" agrees to do its work even on inappropriate comment ID

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 25 14:13:26 GMT 2007


#4533: "Mark as spam" agrees to do its work even on inappropriate comment ID
----------------------------+-----------------------------------------------
 Reporter:  redsweater      |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  normal          |    Milestone:  2.2.2    
Component:  Administration  |      Version:  2.2.1    
 Severity:  normal          |   Resolution:           
 Keywords:                  |  
----------------------------+-----------------------------------------------
Changes (by westi):

  * milestone:  => 2.2.2

Comment:

 This should be checked by the call to {{{get_comment_to_edit}}} here:
 http://trac.wordpress.org/browser/trunk/wp-admin/comment.php#L42

 And if no comment exists then a warning displayed.

 However get_comment_to_edit (wp-admin/includes/comment.php in trunk) is
 broken.

 Change the code like this:

 {{{
 function get_comment_to_edit( $id ) {
     if (!$comment = get_comment( $id ))
     {
         return false;
     }
 ...
 }
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4533#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list