mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix when mysql_connect is set as a connection in the database config and persistent key is not set in the config, the default for persistent is true and this would override the settings in the database config
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4945 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
860c8d3ddc
commit
5b70a957bb
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ class DboMysql extends DboSource {
|
||||||
$connect = $config['connect'];
|
$connect = $config['connect'];
|
||||||
$this->connected = false;
|
$this->connected = false;
|
||||||
|
|
||||||
if (!$config['persistent']) {
|
if (!$config['persistent'] || $config['connect'] === 'mysql_connect') {
|
||||||
$this->connection = mysql_connect($config['host'] . ':' . $config['port'], $config['login'], $config['password'], true);
|
$this->connection = mysql_connect($config['host'] . ':' . $config['port'], $config['login'], $config['password'], true);
|
||||||
} else {
|
} else {
|
||||||
$this->connection = $connect($config['host'], $config['login'], $config['password']);
|
$this->connection = $connect($config['host'], $config['login'], $config['password']);
|
||||||
|
|
Loading…
Reference in a new issue