Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Same


renato

Recommended Posts

I have installed the latest snapshop , restored my db and all semms to be working fine , exept this :

 

Warning: mt_rand(): Invalid range: 0..0 in /export/home/lummet.dk/www/catalog/includes/functions/general.php on line 1137

 

What is that , and how do i fix it.

 

Belov is the code.

 

 

 

// Return a random value

 function tep_rand($min = null, $max = null) {

   static $seeded;

 

   if (!$seeded) {

     mt_srand((double)microtime()*1000000);

     $seeded = true;

   }

   if (!isset($min) && !isset($max)) {

     return mt_rand();

   } else {

     return mt_rand($min, $max);

   }

 }

 

Hope some on knows the awnser to this  :wink:

Link to comment
Share on other sites

This has been discussed in numerous threads today. The problem is solved, CVS is updated.

 

HTH

You can't have everything. That's why trains have difficulty crossing oceans, and hippos did not adapt to fly. -- from the OpenBSD mailinglist.

Link to comment
Share on other sites

Thanks a lot to Jan and his answer is quoted as follows:

 

The snapshot of tomorrow will have the changes included. The current snapshot was build last night.

 

You can however make the (simple) change yourself by looking at this:

 

http://cvs.sourceforge.net/cgi-bin/viewcvs...=1.198&r2=1.199

 

For more details please read:

 

http://www.oscommerce.com/community.php/bugs,800

 

HTH

 

 

cheers

 

renato coto

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...