Welcome Guest, Not a member yet? Register   Sign In
Bug in postgre drivers..
#1

Hi..
 When setting up connect_timeout to postgres I noticed a bug that would cause an error..

Lines 132 to 138 of system\database\drivers\postgre\postgre_driver.php are as follows
PHP Code:
foreach (array('connect_timeout''options''sslmode''service') as $key)
{
    if (isset(
$this->$key) && is_string($this->key) && $this->key !== '')
    {
        
$this->dsn .= $key."='".$this->key."' ";
    }


so if you put a
'connect_timeout' => '5',
into your database config the driver will fail.

Replacing $this->key with $this->$key will fix the issue. For reference...
PHP Code:
foreach (array('connect_timeout''options''sslmode''service') as $key)
{
    if (isset(
$this->$key) && is_string($this->$key) && $this->$key !== '')
    {
        
$this->dsn .= $key."='".$this->$key."' ";
    }


Just in case anyone else notices this issue.
Reply


Messages In This Thread
Bug in postgre drivers.. - by hugo_rune - 04-27-2017, 02:42 AM
RE: Bug in postgre drivers.. - by Paradinight - 04-27-2017, 11:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB