Make WordPress Core


Ignore:
Timestamp:
03/11/2014 07:26:02 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Avoid a warning in wpdb::db_connect(). before_needle parameter of strstr() was added in PHP 5.3.

props klihelp, pento.
fixes #27277.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r27377 r27503  
    13161316            $port_or_socket = strstr( $host, ':' );
    13171317            if ( ! empty( $port_or_socket ) ) {
    1318                 $host = strstr( $host, ':', true );
     1318                $host = substr( $host, 0, strpos( $host, ':' ) );
    13191319                $port_or_socket = substr( $port_or_socket, 1 );
    13201320                if ( 0 !== strpos( $port_or_socket, '/' ) ) {
Note: See TracChangeset for help on using the changeset viewer.