Make WordPress Core

Changeset 25365


Ignore:
Timestamp:
09/11/2013 09:56:31 PM (11 years ago)
Author:
wonderboymusic
Message:

Fix undefined index notices in comment/slashes test cases. wp_new_comment() and edit_comment() expect more variables than were being passed.

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/slashes.php

    r25002 r25365  
    2323        $this->slash_6 = 'String with 6 slashes \\\\\\\\\\\\';
    2424        $this->slash_7 = 'String with 7 slashes \\\\\\\\\\\\\\';
     25
     26        $_SERVER['REMOTE_ADDR'] = null;
    2527    }
    2628
     
    4244            'comment_post_ID' => $post_id,
    4345            'comment_author' => $this->slash_1,
     46            'comment_author_url' => '',
     47            'comment_author_email' => '',
     48            'comment_type' => '',
    4449            'comment_content' => $this->slash_7,
    4550        );
     
    5459            'comment_post_ID' => $post_id,
    5560            'comment_author' => $this->slash_2,
     61            'comment_author_url' => '',
     62            'comment_author_email' => '',
     63            'comment_type' => '',
    5664            'comment_content' => $this->slash_4,
    5765        );
     
    7886        $_POST = array();
    7987        $_POST['comment_ID'] = $comment_id;
     88        $_POST['comment_status'] = '';
    8089        $_POST['newcomment_author'] = $this->slash_1;
     90        $_POST['newcomment_author_url'] = '';
     91        $_POST['newcomment_author_email'] = '';
    8192        $_POST['content'] = $this->slash_7;
    8293        $_POST = add_magic_quotes( $_POST );
     
    90101        $_POST = array();
    91102        $_POST['comment_ID'] = $comment_id;
     103        $_POST['comment_status'] = '';
    92104        $_POST['newcomment_author'] = $this->slash_2;
     105        $_POST['newcomment_author_url'] = '';
     106        $_POST['newcomment_author_email'] = '';
    93107        $_POST['content'] = $this->slash_4;
    94108        $_POST = add_magic_quotes( $_POST );
Note: See TracChangeset for help on using the changeset viewer.