1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Added check to ensure a foreign object is actually a Doctrine_Record before calling isModified.

This commit is contained in:
subzero2000 2007-06-26 21:06:19 +00:00
parent c5fc122852
commit 031b2ba70c

View File

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