mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
Avoid a warning in wpdb::db_connect(). before_needle parameter of strstr() was added in PHP 5.3.
props klihelp, pento. fixes #27277. Built from https://develop.svn.wordpress.org/trunk@27503 git-svn-id: http://core.svn.wordpress.org/trunk@27346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f29df4f74c
commit
c099c5a031
@ -1315,7 +1315,7 @@ class wpdb {
|
||||
$host = $this->dbhost;
|
||||
$port_or_socket = strstr( $host, ':' );
|
||||
if ( ! empty( $port_or_socket ) ) {
|
||||
$host = strstr( $host, ':', true );
|
||||
$host = substr( $host, 0, strpos( $host, ':' ) );
|
||||
$port_or_socket = substr( $port_or_socket, 1 );
|
||||
if ( 0 !== strpos( $port_or_socket, '/' ) ) {
|
||||
$port = intval( $port_or_socket );
|
||||
|
Loading…
Reference in New Issue
Block a user