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:
@@ -61,11 +61,11 @@
|
|||||||
function wpsql_connect($dbserver, $dbuser, $dbpass)
|
function wpsql_connect($dbserver, $dbuser, $dbpass)
|
||||||
{
|
{
|
||||||
$GLOBALS['pg4wp_connstr'] = '';
|
$GLOBALS['pg4wp_connstr'] = '';
|
||||||
list($host, $port) = explode(':', $dbserver);
|
$hostport = explode(':', $dbserver);
|
||||||
if( !empty( $host))
|
if( !empty( $hostport[0]))
|
||||||
$GLOBALS['pg4wp_connstr'] .= ' host='.$host;
|
$GLOBALS['pg4wp_connstr'] .= ' host='.$hostport[0];
|
||||||
if( !empty( $port))
|
if( !empty( $hostport[1]))
|
||||||
$GLOBALS['pg4wp_connstr'] .= ' port='.$port;
|
$GLOBALS['pg4wp_connstr'] .= ' port='.$hostport[1];
|
||||||
if( !empty( $dbuser))
|
if( !empty( $dbuser))
|
||||||
$GLOBALS['pg4wp_connstr'] .= ' user='.$dbuser;
|
$GLOBALS['pg4wp_connstr'] .= ' user='.$dbuser;
|
||||||
if( !empty( $dbpass))
|
if( !empty( $dbpass))
|
||||||
|
Reference in New Issue
Block a user