Returning only booleans in Model::__isset() and removing return by reference in Model::getDataSource()

This commit is contained in:
José Lorenzo Rodríguez Urdaneta 2010-07-15 23:17:13 -04:30
parent c7f1650510
commit bc27d1eae4

View file

@ -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;