Make WordPress Core

Ticket #41722: 41722.5.diff

File 41722.5.diff, 1.1 KB (added by birgire, 8 years ago)
  • src/wp-includes/wp-db.php

    diff --git src/wp-includes/wp-db.php src/wp-includes/wp-db.php
    index 8787c99..dbae817 100644
    class wpdb { 
    16271627                        }
    16281628                }
    16291629
     1630                if ( empty( $port ) ) {
     1631                        $port = null;
     1632                }
     1633
     1634                if ( empty( $socket ) ) {
     1635                        $socket = null;
     1636                }
     1637
     1638                if ( empty( $host ) ) {
     1639                        $host = null;
     1640                }
     1641
    16301642                return array( $host, $port, $socket, $is_ipv6 );
    16311643        }
    16321644
  • tests/phpunit/tests/db.php

    diff --git tests/phpunit/tests/db.php tests/phpunit/tests/db.php
    index 208c70e..d825aae 100644
    class Tests_DB extends WP_UnitTestCase { 
    12081208
    12091209                        list( $parsed_host, $parsed_port, $parsed_socket, $parsed_is_ipv6 ) = $data;
    12101210
    1211                         $this->assertEquals( $host, $parsed_host );
    1212                         $this->assertEquals( $port, $parsed_port );
    1213                         $this->assertEquals( $socket, $parsed_socket );
    1214                         $this->assertEquals( $is_ipv6, $parsed_is_ipv6 );
     1211                        $this->assertSame( $host, $parsed_host );
     1212                        $this->assertSame( $port, $parsed_port );
     1213                        $this->assertSame( $socket, $parsed_socket );
     1214                        $this->assertSame( $is_ipv6, $parsed_is_ipv6 );
    12151215                }
    12161216        }
    12171217