From 75c5134bc9c682dc24e322806c42c2efb752923f Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Wed, 11 Apr 2012 15:30:38 +1200 Subject: [PATCH] BUGFIX: Fix Money::setValue() using old api --- model/fieldtypes/Money.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/fieldtypes/Money.php b/model/fieldtypes/Money.php index ac1f7586a..1d15b3811 100644 --- a/model/fieldtypes/Money.php +++ b/model/fieldtypes/Money.php @@ -102,7 +102,7 @@ class Money extends DBField implements CompositeDBField { function setValue($value, $record = null, $markChanged = true) { // @todo Allow resetting value to NULL through Money $value field - if ($value instanceof Money && $value->hasValue()) { + if ($value instanceof Money && $value->exists()) { $this->setCurrency($value->getCurrency(), $markChanged); $this->setAmount($value->getAmount(), $markChanged); if($markChanged) $this->isChanged = true;