Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 75c5134bc9c682dc24e322806c42c2efb752923f 1 parent bdb312c
@ajoneil ajoneil authored
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;
Please sign in to comment.
Something went wrong with that request. Please try again.