Skip to content

Commit

Permalink
Another bugfix for the minimum bet. This code needs to be cleaned up.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyJones committed Dec 27, 2015
1 parent 29578b1 commit 887777e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gamemaster/game.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -399,8 +399,9 @@ public function resetMinimumBet()
$minimumBet = $this->Members->pointsLowestCD(); $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) // 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)) ) // 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); $DB->sql_put("UPDATE wD_Games SET minimumBet = ".($minimumBet !== false?$minimumBet:'NULL')." WHERE id=".$this->id);
$this->minimumBet = $minimumBet; $this->minimumBet = $minimumBet;
Expand Down

0 comments on commit 887777e

Please sign in to comment.