Changeset 53671
- Timestamp:
- 07/06/2022 10:30:11 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r53670 r53671 2042 2042 */ 2043 2043 public function parse_db_host( $host ) { 2044 $port = null;2045 2044 $socket = null; 2046 2045 $is_ipv6 = false; … … 2071 2070 } 2072 2071 2073 $host = ''; 2074 foreach ( array( 'host', 'port' ) as $component ) { 2075 if ( ! empty( $matches[ $component ] ) ) { 2076 $$component = $matches[ $component ]; 2077 } 2078 } 2079 2072 $host = ! empty( $matches['host'] ) ? $matches['host'] : ''; 2080 2073 // MySQLi port cannot be a string; must be null or an integer. 2081 $port = $port ? absint( $port) : null;2074 $port = ! empty( $matches['port'] ) ? absint( $matches['port'] ) : null; 2082 2075 2083 2076 return array( $host, $port, $socket, $is_ipv6 );
Note: See TracChangeset
for help on using the changeset viewer.