Skip to content

Commit

Permalink
PHP is complaining about a float to int loss of precision.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Nov 5, 2023
1 parent a7c6c97 commit 06e78d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions other/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4098,13 +4098,13 @@ function template_welcome_message()
{
$ago = time() - $upcontext['started'];
$ago_hours = floor($ago / 3600);
$ago_minutes = intval(($ago / 60) % 60);
$ago_minutes = (int) (((int) ($ago / 60)) % 60);
$ago_seconds = intval($ago % 60);
$agoTxt = $ago < 60 ? 'upgrade_time_s' : ($ago < 3600 ? 'upgrade_time_ms' : 'upgrade_time_hms');

$updated = time() - $upcontext['updated'];
$updated_hours = floor($updated / 3600);
$updated_minutes = intval(($updated / 60) % 60);
$updated_minutes = intval(((int) ($updated / 60)) % 60);
$updated_seconds = intval($updated % 60);
$updatedTxt = $updated < 60 ? 'upgrade_time_updated_s' : ($updated < 3600 ? 'upgrade_time_updated_hm' : 'upgrade_time_updated_hms');

Expand Down

0 comments on commit 06e78d8

Please sign in to comment.