mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Convertig old-style find call to new api
This commit is contained in:
parent
00c0bb4d62
commit
f7a113d2b0
1 changed files with 2 additions and 1 deletions
|
@ -1121,7 +1121,8 @@ class Model extends Overloadable {
|
|||
} else {
|
||||
$recursive = $this->recursive;
|
||||
}
|
||||
if ($data = $this->find($conditions, $name, $order, $recursive)) {
|
||||
$fields = $name;
|
||||
if ($data = $this->find('first',compact('conditions','fields','order','recursive'))) {
|
||||
if (strpos($name, '.') === false) {
|
||||
if (isset($data[$this->alias][$name])) {
|
||||
return $data[$this->alias][$name];
|
||||
|
|
Loading…
Reference in a new issue