mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Returning only booleans in Model::__isset() and removing return by reference in Model::getDataSource()
This commit is contained in:
parent
c7f1650510
commit
bc27d1eae4
1 changed files with 3 additions and 2 deletions
|
@ -555,7 +555,8 @@ class Model extends Object {
|
||||||
$this->{$name}->primaryKey = $this->hasAndBelongsToMany[$assocKey]['foreignKey'];
|
$this->{$name}->primaryKey = $this->hasAndBelongsToMany[$assocKey]['foreignKey'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->{$name};
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2813,7 +2814,7 @@ class Model extends Object {
|
||||||
*
|
*
|
||||||
* @return object A DataSource object
|
* @return object A DataSource object
|
||||||
*/
|
*/
|
||||||
public function &getDataSource() {
|
public function getDataSource() {
|
||||||
static $configured = false;
|
static $configured = false;
|
||||||
if (!$configured && $this->useTable !== false) {
|
if (!$configured && $this->useTable !== false) {
|
||||||
$configured = true;
|
$configured = true;
|
||||||
|
|
Loading…
Reference in a new issue