Addresses issue of infinte function recursion when saving related objects. Fixes #363.
This commit is contained in:
parent
a593d746c3
commit
a795996efa
@ -221,11 +221,15 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module
|
|||||||
} else {
|
} else {
|
||||||
// ONE-TO-ONE relationship
|
// ONE-TO-ONE relationship
|
||||||
$obj = $record->get($rel->getAlias());
|
$obj = $record->get($rel->getAlias());
|
||||||
$obj->save($this->conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Protection against infinite function recursion before attempting to save
|
||||||
|
if ($obj->isModified()) {
|
||||||
|
$obj->save($this->conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $saveLater;
|
return $saveLater;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user