mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
[ticket/9643] Only split $port from $sqlserver, if it's not an IPv6 address.
PHPBB3-9643
This commit is contained in:
parent
a5b238019b
commit
879bc89524
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ class dbal_postgres extends dbal
|
|||
|
||||
if ($sqlserver)
|
||||
{
|
||||
if (strpos($sqlserver, ':') !== false)
|
||||
// $sqlserver can carry a port separated by : for compatibility reasons
|
||||
// If $sqlserver has more than one : it's probably an IPv6 address.
|
||||
// In this case we only allow passing a port via the $port variable.
|
||||
if (substr_count($sqlserver, ':') === 1)
|
||||
{
|
||||
list($sqlserver, $port) = explode(':', $sqlserver);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue