mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
forgot to commit these changes to trunk and my own sandbox
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@635 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
184e0d06e8
commit
dcf9a8cc38
1 changed files with 2 additions and 2 deletions
|
@ -942,10 +942,10 @@ class Model extends Object
|
|||
|
||||
$fields = $values = array();
|
||||
|
||||
$count = 0;
|
||||
if(count($this->data) > 1)
|
||||
{
|
||||
$weHaveMulti = true;
|
||||
$count = 0;
|
||||
$joined = false;
|
||||
}
|
||||
else
|
||||
|
@ -1034,7 +1034,7 @@ class Model extends Object
|
|||
$this->id = $this->db->lastInsertId($this->table, 'id');
|
||||
if(!empty($joined))
|
||||
{
|
||||
if(!$this->id > 0)
|
||||
if(!$this->id > 0 && isset($newID))
|
||||
{
|
||||
$this->id = $newID;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue