WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/06/2015 02:59:50 AM (7 years ago)
Author:
pento
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.

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

See #32165.

File:
1 edited

Legend:

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

    r32306 r32364  
    122122        }
    123123
    124         $post_id = $this->factory->post->create();
     124        $u = $this->factory->user->create();
     125        $post_id = $this->factory->post->create( array( 'post_author' => $u ) );
    125126
    126127        $data = array(
     
    137138        $id = wp_new_comment( $data );
    138139
    139         $this->assertFalse( $id );
     140        $comment = get_comment( $id );
     141
     142        $this->assertEquals( strlen( $comment->comment_content ), 65535 );
    140143
    141144        // Cleanup.
Note: See TracChangeset for help on using the changeset viewer.