diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 674800a8a9..1e5fda6743 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -1703,11 +1703,11 @@ class wpdb { // We need to check for an IPv6 address first. // An IPv6 address will always contain at least two colons. if ( substr_count( $host, ':' ) > 1 ) { - $pattern = '#^(?:\[)?(?[0-9a-fA-F:]+)(?:\]:(?[\d]+))?#'; + $pattern = '#^(?:\[)?(?P[0-9a-fA-F:]+)(?:\]:(?P[\d]+))?#'; $is_ipv6 = true; } else { // We seem to be dealing with an IPv4 address. - $pattern = '#^(?[^:/]*)(?::(?[\d]+))?#'; + $pattern = '#^(?P[^:/]*)(?::(?P[\d]+))?#'; } $matches = array();