Permalink
Browse files

Merge pull request #32 from jelmersnoeck/isPrice_fix

Filter: fix the price check.
  • Loading branch information...
bauffman committed Feb 14, 2012
2 parents 64c857a + 4574bcb commit b869948ef5efa464554cb23b553d52fb90512fff
Showing with 1 addition and 1 deletion.
  1. +1 −1 spoon/filter/filter.php
View
@@ -654,7 +654,7 @@ public static function isPrice($value, $precision = 2, $allowNegative = false, $
if(mb_strpos($value, '.') !== false) rtrim($value, '0');
// no negatives allowed
- if(!$allowNegative) return ((float) $value >= 0);
+ if(!$allowNegative) return (((float) $value >= 0) && ((string) (float) $value == $value));
// no commas allowed
return ((string) (float) $value === (string) $value);

0 comments on commit b869948

Please sign in to comment.