From bf263fe1b359ddf2f725d0cc9e6e4c28574f8190 Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 24 May 2007 19:29:27 +0000 Subject: [PATCH] --- lib/Doctrine/Relation/LocalKey.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Relation/LocalKey.php b/lib/Doctrine/Relation/LocalKey.php index d0b5ed1be..db86ed6bc 100644 --- a/lib/Doctrine/Relation/LocalKey.php +++ b/lib/Doctrine/Relation/LocalKey.php @@ -48,7 +48,9 @@ class Doctrine_Relation_LocalKey extends Doctrine_Relation if (empty($id)) { $related = $this->getTable()->create(); } else { - if ( ! ($related = $this->getTable()->find($id))) { + $related = $this->getTable()->find($id); + + if ( ! $related) { $related = $this->getTable()->create(); } }