Skip to content

Commit

Permalink
Small fix for port only (#4165).
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe136 committed Aug 23, 2014
1 parent 2961082 commit 6b22d28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/joomla/database/driver/postgresql.php
Expand Up @@ -82,8 +82,9 @@ public function __construct( $options )
$options['database'] = (isset($options['database'])) ? $options['database'] : '';

// Fix database with port connection
if(strpos($options['host'], ':')) {
if(strpos($options['host'], ':') !== false) {
list($options['host'], $options['port']) = explode(':', $options['host'], 2);
$options['host'] = ($options['host'] != '') ? $options['host'] : 'localhost';
}

// Finalize initialization
Expand Down

0 comments on commit 6b22d28

Please sign in to comment.