From 2bb8b7083f701755a6027f395e3b575c086f284e Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 19 Sep 2007 14:59:06 +0000 Subject: [PATCH] --- lib/Doctrine/Connection/UnitOfWork.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Connection/UnitOfWork.php b/lib/Doctrine/Connection/UnitOfWork.php index f16164dda..815cde4dc 100644 --- a/lib/Doctrine/Connection/UnitOfWork.php +++ b/lib/Doctrine/Connection/UnitOfWork.php @@ -193,7 +193,11 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module if ($record->hasReference($alias)) { $obj = $record->$alias; - $obj->save($conn); + + // check that the related object is not Doctrine_Null + if ($obj instanceof Doctrine_Record) { + $obj->save($conn); + } } }