Plugin Directory

Changeset 546732


Ignore:
Timestamp:
05/20/2012 10:17:54 PM (14 years ago)
Author:
hawk__
Message:

Removed a PHP notice in wpsql_connect()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php

    r546724 r546732  
    6262    {
    6363        $GLOBALS['pg4wp_connstr'] = '';
    64         list($host, $port) = explode(':', $dbserver);
    65         if( !empty( $host))
    66             $GLOBALS['pg4wp_connstr'] .= ' host='.$host;
    67         if( !empty( $port))
    68             $GLOBALS['pg4wp_connstr'] .= ' port='.$port;
     64        $hostport = explode(':', $dbserver);
     65        if( !empty( $hostport[0]))
     66            $GLOBALS['pg4wp_connstr'] .= ' host='.$hostport[0];
     67        if( !empty( $hostport[1]))
     68            $GLOBALS['pg4wp_connstr'] .= ' port='.$hostport[1];
    6969        if( !empty( $dbuser))
    7070            $GLOBALS['pg4wp_connstr'] .= ' user='.$dbuser;
Note: See TracChangeset for help on using the changeset viewer.