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