Skip to content
Permalink
Browse files

Removing assignments by reference in model class

  • Loading branch information...
lorenzo committed Jul 16, 2010
1 parent 14d3d00 commit 6fb930c73b532c1e11b06953791e26f7ba2017d7
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/model/model.php
@@ -1864,7 +1864,7 @@ protected function _deleteDependent($id, $cascade) {
foreach (array_merge($this->hasMany, $this->hasOne) as $assoc => $data) {
if ($data['dependent'] === true && $cascade === true) {
$model =& $this->{$assoc};
$model = $this->{$assoc};
$conditions = array($model->escapeField($data['foreignKey']) => $id);
if ($data['conditions']) {
$conditions = array_merge((array)$data['conditions'], $conditions);
@@ -2795,7 +2795,7 @@ public function setDataSource($dataSource = null) {
}
$db = ConnectionManager::getDataSource($this->useDbConfig);
if (!empty($oldConfig) && isset($db->config['prefix'])) {
$oldDb =& ConnectionManager::getDataSource($oldConfig);
$oldDb = ConnectionManager::getDataSource($oldConfig);
if (!isset($this->tablePrefix) || (!isset($oldDb->config['prefix']) || $this->tablePrefix == $oldDb->config['prefix'])) {
$this->tablePrefix = $db->config['prefix'];

0 comments on commit 6fb930c

Please sign in to comment.
You can’t perform that action at this time.