mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-29 16:56:03 +03:00
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);
|
$max = PHPExcel_Calculation_Functions::flattenSingleValue($max);
|
||||||
|
|
||||||
if ($min == 0 && $max == 0) {
|
if ($min == 0 && $max == 0) {
|
||||||
return (rand(0,10000000)) / 10000000;
|
return (mt_rand(0,10000000)) / 10000000;
|
||||||
} else {
|
} else {
|
||||||
return rand($min, $max);
|
return mt_rand($min, $max);
|
||||||
}
|
}
|
||||||
} // function RAND()
|
} // function RAND()
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ date_default_timezone_set('Europe/London');
|
|||||||
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
||||||
|
|
||||||
date_default_timezone_set('Europe/London');
|
date_default_timezone_set('Europe/London');
|
||||||
|
mt_srand(1234567890);
|
||||||
|
|
||||||
/** Include PHPExcel */
|
/** Include PHPExcel */
|
||||||
require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
|
require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
|
||||||
|
@ -59,6 +59,7 @@ $aTests = array(
|
|||||||
, '11documentsecurity-xls.php'
|
, '11documentsecurity-xls.php'
|
||||||
, '12cellProtection.php'
|
, '12cellProtection.php'
|
||||||
, '13calculation.php'
|
, '13calculation.php'
|
||||||
|
, '13calculationCyclicFormulae.php'
|
||||||
, '14excel5.php'
|
, '14excel5.php'
|
||||||
, '15datavalidation.php'
|
, '15datavalidation.php'
|
||||||
, '15datavalidation-xls.php'
|
, '15datavalidation-xls.php'
|
||||||
|
Loading…
Reference in New Issue
Block a user