mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding fix for Ticket #1683
This frees memory returned from a result set. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3943 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ac310dbabe
commit
ca5753bc39
2 changed files with 2 additions and 0 deletions
|
@ -116,6 +116,7 @@ class DboMysql extends DboSource {
|
|||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@mysql_free_result($this->results);
|
||||
$this->connected = !@mysql_close($this->connection);
|
||||
return !$this->connected;
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ class DboMysqli extends DboSource {
|
|||
* @return boolean True if the database could be disconnected, else false
|
||||
*/
|
||||
function disconnect() {
|
||||
@mysqli_free_result($this->results);
|
||||
$this->connected = !@mysqli_close($this->connection);
|
||||
return !$this->connected;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue