Browse files

BUGFIX: Fix Money::setValue() using old api

  • Loading branch information...
1 parent bdb312c commit 75c5134bc9c682dc24e322806c42c2efb752923f Andrew O'Neil committed Apr 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 model/fieldtypes/Money.php
View
2 model/fieldtypes/Money.php
@@ -102,7 +102,7 @@ function addToQuery(&$query) {
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;

0 comments on commit 75c5134

Please sign in to comment.