Permalink
Browse files

Filter: fix the price check.

  • Loading branch information...
jelmersnoeck
jelmersnoeck committed Feb 14, 2012
1 parent 64c857a commit 4574bcbf2ceab85cc3fe4689085e14d8c5e605f6
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 4574bcb

Please sign in to comment.