1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-24 01:09:50 +01:00

fix division by zero in Propel ColumnTypeGuesser

This commit is contained in:
Francois Zaninotto 2011-10-24 12:01:31 +02:00
parent 9287247053
commit 900e81aed6

View File

@ -41,10 +41,10 @@ class ColumnTypeGuesser
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: