mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Added patch from 'cavendish' releasing previous result resources in resultSet(). Closes #4801
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7374 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
96b5a6fa87
commit
4267a4f631
2 changed files with 6 additions and 0 deletions
|
@ -427,6 +427,9 @@ class DboMysql extends DboSource {
|
|||
* @param unknown_type $results
|
||||
*/
|
||||
function resultSet(&$results) {
|
||||
if (isset($this->results) && is_resource($this->results) && $this->results != $results) {
|
||||
mysql_free_result($this->results);
|
||||
}
|
||||
$this->results =& $results;
|
||||
$this->map = array();
|
||||
$num_fields = mysql_num_fields($results);
|
||||
|
|
|
@ -405,6 +405,9 @@ class DboMysqli extends DboSource {
|
|||
* @param unknown_type $results
|
||||
*/
|
||||
function resultSet(&$results) {
|
||||
if (isset($this->results) && is_resource($this->results) && $this->results != $results) {
|
||||
mysqli_free_result($this->results);
|
||||
}
|
||||
$this->results =& $results;
|
||||
$this->map = array();
|
||||
$num_fields = mysqli_num_fields($results);
|
||||
|
|
Loading…
Add table
Reference in a new issue