WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/06/2015 07:16:41 PM (7 years ago)
Author:
mdawaffe
Message:

WPDB: When checking that a string can be sent to MySQL, we shouldn't use mb_convert_encoding(), as it behaves differently to MySQL's character encoding conversion.

Merge of [32364] to the 3.7 branch.

Props mdawaffe, pento, nbachiyski, jorbin, johnjamesjacoby, jeremyfelt.

See #32165.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7/tests/phpunit/tests/comment.php

    r32318 r32391  
    2424        }
    2525
    26         $post_id = $this->factory->post->create();
     26        $u = $this->factory->user->create();
     27        $post_id = $this->factory->post->create( array( 'post_author' => $u ) );
    2728
    2829        $data = array(
     
    3738        );
    3839
     40        add_filter( 'pre_option_moderation_notify', '__return_zero' );
    3941        $id = wp_new_comment( $data );
     42        remove_filter( 'pre_option_moderation_notify', '__return_zero' );
    4043
    41         $this->assertFalse( $id );
     44        $this->assertEmpty( $id );
    4245
    4346        // Cleanup.
Note: See TracChangeset for help on using the changeset viewer.