Modify RAND() and RANDBETWEEN() to use mt_rand()
This commit is contained in:
parent
ab49033479
commit
a4afd4d313
|
@ -880,9 +880,9 @@ class PHPExcel_Calculation_MathTrig {
|
|||
$max = PHPExcel_Calculation_Functions::flattenSingleValue($max);
|
||||
|
||||
if ($min == 0 && $max == 0) {
|
||||
return (rand(0,10000000)) / 10000000;
|
||||
return (mt_rand(0,10000000)) / 10000000;
|
||||
} else {
|
||||
return rand($min, $max);
|
||||
return mt_rand($min, $max);
|
||||
}
|
||||
} // function RAND()
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ date_default_timezone_set('Europe/London');
|
|||
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
mt_srand(1234567890);
|
||||
|
||||
/** Include PHPExcel */
|
||||
require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
|
||||
|
|
|
@ -59,6 +59,7 @@ $aTests = array(
|
|||
, '11documentsecurity-xls.php'
|
||||
, '12cellProtection.php'
|
||||
, '13calculation.php'
|
||||
, '13calculationCyclicFormulae.php'
|
||||
, '14excel5.php'
|
||||
, '15datavalidation.php'
|
||||
, '15datavalidation-xls.php'
|
||||
|
|
Loading…
Reference in New Issue