Changeset 924 for trunk


Ignore:
Timestamp:
May 10, 2022, 10:09:23 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Wrong float to int conversion.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Types/TimeDiff.php

    r887 r924  
    99    if ($Item['Value'] == null) $Output = '';
    1010    else {
    11       $Output = sprintf('%02d', floor($Item['Value'] / 3600 % 24)).':'.
    12         sprintf('%02d', floor($Item['Value'] / 60 % 60)).':'.
    13         sprintf('%02d', floor($Item['Value'] % 60));
     11      $Output = sprintf('%02d', floor($Item['Value'] / 3600) % 24).':'.
     12        sprintf('%02d', floor($Item['Value'] / 60) % 60).':'.
     13        sprintf('%02d', floor($Item['Value']) % 60);
    1414      $Days = floor($Item['Value'] / (60 * 60 * 24));
    1515      if ($Days > 0) $Output = $Days.' dnů '.$Output;
  • trunk/Modules/User/UserModel.php

    r922 r924  
    4040  function GetSalt(): string
    4141  {
    42     mt_srand(microtime(true) * 100000 + memory_get_usage(true));
     42    mt_srand(intval(microtime(true)) * 100000 + memory_get_usage(true));
    4343    return sha1(uniqid(mt_rand(), true));
    4444  }
Note: See TracChangeset for help on using the changeset viewer.