Permalink
Browse files

Another bugfix for the minimum bet. This code needs to be cleaned up.

  • Loading branch information...
1 parent 29578b1 commit 887777e1ea4eb2e6c27c02f8beec1e878ffcea4e @TimothyJones TimothyJones committed Dec 27, 2015
Showing with 3 additions and 2 deletions.
  1. +3 −2 gamemaster/game.php
View
@@ -399,8 +399,9 @@ public function resetMinimumBet()
$minimumBet = $this->Members->pointsLowestCD();
}
- // The new value isn't the same, and it isn't comparing false with null (which are the same in this case)
- if ( ($minimumBet === 0 || $minimumBet != $this->minimumBet) && !( $minimumBet===false && is_null($this->minimumBet)) )
+ // The new value isn't the same, and it isn't comparing false with null (which are the same in this case)
+ // This really needs to be cleaned up so that it isn't relying on how true/false/null work.
+ if ( ($minimumBet === 0 || $minimumBet !== $this->minimumBet) && !( $minimumBet===false && is_null($this->minimumBet)) )
{
$DB->sql_put("UPDATE wD_Games SET minimumBet = ".($minimumBet !== false?$minimumBet:'NULL')." WHERE id=".$this->id);
$this->minimumBet = $minimumBet;

0 comments on commit 887777e

Please sign in to comment.