mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Applying patch from 'tPl0ch', connect key is set to 'mysql_connect' when not using persistent connections. Fixes #132
This commit is contained in:
parent
6356c6ed87
commit
425dcf2df5
1 changed files with 2 additions and 2 deletions
|
@ -448,13 +448,13 @@ class DboMysql extends DboMysqlBase {
|
|||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
$connect = $config['connect'];
|
||||
$this->connected = false;
|
||||
|
||||
if (!$config['persistent']) {
|
||||
$this->connection = mysql_connect($config['host'] . ':' . $config['port'], $config['login'], $config['password'], true);
|
||||
$config['connect'] = 'mysql_connect';
|
||||
} else {
|
||||
$this->connection = $connect($config['host'] . ':' . $config['port'], $config['login'], $config['password']);
|
||||
$this->connection = mysql_pconnect($config['host'] . ':' . $config['port'], $config['login'], $config['password']);
|
||||
}
|
||||
|
||||
if (mysql_select_db($config['database'], $this->connection)) {
|
||||
|
|
Loading…
Reference in a new issue