Removed a PHP notice in wpsql_connect()

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@546732 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2012-05-20 22:17:54 +00:00
parent 78e876dec0
commit 7d70a7bc8c

View File

@@ -61,11 +61,11 @@
function wpsql_connect($dbserver, $dbuser, $dbpass)
{
$GLOBALS['pg4wp_connstr'] = '';
list($host, $port) = explode(':', $dbserver);
if( !empty( $host))
$GLOBALS['pg4wp_connstr'] .= ' host='.$host;
if( !empty( $port))
$GLOBALS['pg4wp_connstr'] .= ' port='.$port;
$hostport = explode(':', $dbserver);
if( !empty( $hostport[0]))
$GLOBALS['pg4wp_connstr'] .= ' host='.$hostport[0];
if( !empty( $hostport[1]))
$GLOBALS['pg4wp_connstr'] .= ' port='.$hostport[1];
if( !empty( $dbuser))
$GLOBALS['pg4wp_connstr'] .= ' user='.$dbuser;
if( !empty( $dbpass))