WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #41722, comment 9


Ignore:
Timestamp:
08/30/2017 10:00:15 AM (2 years ago)
Author:
birgire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41722, comment 9

    v2 v3  
    1 Regarding the IPv4 case, it looks like we could parse {{{'localhost:/tmp/mysql.sock'}}} with:
     1Regarding the IPv4 case, it looks like we could parse {{{':3306'}}}, {{{':/tmp/mysql.sock'}}} and {{{'localhost:/tmp/mysql.sock'}}} with:
    22
    33{{{
    4   $pattern = '#^(?:\[)?(?<host>[^:^/]+)(?::(?<port>[\d]+))?(?::(?<socket>/.+))?#';
     4$pattern = '#^(?:\[)?(?<host>[^:/]*)(?::(?<port>[\d]+))?(?::(?<socket>/.+))?#';
     5}}}
     6
     7instead of
     8
     9{{{
     10$pattern = '/^(?:\[)?(?<host>[^:^\/]+)(?::(?<port>[\d]+))?(?:\/(?<socket>.+))?/';
    511}}}
    612