1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-27 13:35:13 +02:00

Merge branch 'ticket/bantu/9643' into develop-olympus

* ticket/bantu/9643:
  [ticket/9643] Only split $port from $sqlserver, if it's not an IPv6 address.
This commit is contained in:
Andreas Fischer
2010-06-20 22:45:28 +02:00

View File

@ -46,7 +46,10 @@ class dbal_postgres extends dbal
if ($sqlserver) 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); list($sqlserver, $port) = explode(':', $sqlserver);
} }