Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 75c5134bc9c682dc24e322806c42c2efb752923f 1 parent bdb312c
Andrew O'Neil authored April 11, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  model/fieldtypes/Money.php
2  model/fieldtypes/Money.php
@@ -102,7 +102,7 @@ function addToQuery(&$query) {
102 102
 
103 103
 	function setValue($value, $record = null, $markChanged = true) {
104 104
 		// @todo Allow resetting value to NULL through Money $value field
105  
-		if ($value instanceof Money && $value->hasValue()) {
  105
+		if ($value instanceof Money && $value->exists()) {
106 106
 			$this->setCurrency($value->getCurrency(), $markChanged);
107 107
 			$this->setAmount($value->getAmount(), $markChanged);
108 108
 			if($markChanged) $this->isChanged = true;

0 notes on commit 75c5134

Please sign in to comment.
Something went wrong with that request. Please try again.