mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 12:02:41 +00:00
merging 1.2
This commit is contained in:
parent
94c01ac7b4
commit
6535e6225c
6 changed files with 39 additions and 9 deletions
|
@ -1010,7 +1010,10 @@ class Model extends Overloadable {
|
|||
}
|
||||
|
||||
if ($id !== null && $id !== false) {
|
||||
$this->data = $this->find(array($this->alias . '.' . $this->primaryKey => $id), $fields);
|
||||
$this->data = $this->find('first', array(
|
||||
'conditions' => array($this->alias . '.' . $this->primaryKey => $id),
|
||||
'fields' => $fields
|
||||
));
|
||||
return $this->data;
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue