forked from Wavyzz/dolibarr
Replace function rand with mt_rand (prepare php 8)
This commit is contained in:
@@ -85,12 +85,12 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
|
||||
{
|
||||
print "Product ".$s;
|
||||
$produit = new Product($db);
|
||||
$produit->type = rand(0,1);
|
||||
$produit->type = mt_rand(0,1);
|
||||
$produit->status = 1;
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = rand(1,1000);
|
||||
$produit->price = mt_rand(1,1000);
|
||||
$produit->tva_tx = "19.6";
|
||||
$ret=$produit->create($user);
|
||||
if ($ret < 0) print "Error $ret - ".$produit->error."\n";
|
||||
|
||||
Reference in New Issue
Block a user