mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding fix for Ticket #2214
Removed persistent connection setting in DboMysqli::connect() since there is no persistent connection function for mysqli git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4656 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
2925df7c54
commit
330630c9d0
1 changed files with 2 additions and 9 deletions
|
@ -65,7 +65,7 @@ class DboMysqli extends DboSource {
|
|||
'password' => '',
|
||||
'database' => 'cake',
|
||||
'port' => '3306',
|
||||
'connect' => 'mysqli_pconnect');
|
||||
'connect' => 'mysqli_connect');
|
||||
/**
|
||||
* Mysqli column definition
|
||||
*
|
||||
|
@ -89,14 +89,7 @@ class DboMysqli extends DboSource {
|
|||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
$connect = $config['connect'];
|
||||
$this->connected = false;
|
||||
|
||||
if (!$config['persistent']) {
|
||||
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], true);
|
||||
} else {
|
||||
$this->connection = $connect($config['host'], $config['login'], $config['password']);
|
||||
}
|
||||
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], null, $config['port']);
|
||||
|
||||
if (mysqli_select_db($this->connection, $config['database'])) {
|
||||
$this->connected = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue