![]() |
Bug in postgre drivers.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Bug in postgre drivers.. (/showthread.php?tid=67934) |
Bug in postgre drivers.. - hugo_rune - 04-27-2017 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) 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) Just in case anyone else notices this issue. RE: Bug in postgre drivers.. - Paradinight - 04-27-2017 (04-27-2017, 02:42 AM)hugo_rune Wrote: Hi.. https://github.com/bcit-ci/CodeIgniter/blob/3.1.4/system/database/drivers/postgre/postgre_driver.php#L131 PHP Code: /* We don't have these options as elements in our standard configuration edit: it was fixed in the 3.1.4 Version. https://github.com/bcit-ci/CodeIgniter/issues/5057 Update to the current version. |