Skip to content

Commit

Permalink
fix division by zero in Propel ColumnTypeGuesser
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Oct 24, 2011
1 parent 9287247 commit 900e81a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Faker/ORM/Propel/ColumnTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public function guessFormat($column)
case PropelColumnTypes::BIGINT:
return function() { return mt_rand(0,18446744073709551615); };
case PropelColumnTypes::FLOAT:
return function() { return mt_rand(0,4294967295)/mt_rand(0,4294967295); };
return function() { return mt_rand(0,4294967295)/mt_rand(1,4294967295); };
case PropelColumnTypes::DOUBLE:
case PropelColumnTypes::REAL:
return function() { return mt_rand(0,18446744073709551615)/mt_rand(0,18446744073709551615); };
return function() { return mt_rand(0,18446744073709551615)/mt_rand(1,18446744073709551615); };
case PropelColumnTypes::CHAR:
case PropelColumnTypes::VARCHAR:
case PropelColumnTypes::BINARY:
Expand Down

0 comments on commit 900e81a

Please sign in to comment.