Added check to ensure a foreign object is actually a Doctrine_Record before calling isModified.
This commit is contained in:
parent
c5fc122852
commit
031b2ba70c
1 changed files with 2 additions and 1 deletions
|
@ -265,7 +265,8 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module
|
|||
$obj = $record->get($rel->getAlias());
|
||||
|
||||
// Protection against infinite function recursion before attempting to save
|
||||
if ($obj->isModified()) {
|
||||
if ($obj instanceof Doctrine_Record &&
|
||||
$obj->isModified()) {
|
||||
$obj->save($this->conn);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue