Skip to content

Commit

Permalink
Fix 'Uncaught Exception TypeError: abs(): Argument #1 () must be of t…
Browse files Browse the repository at this point in the history
…ype int|float, string given'
  • Loading branch information
cedric-anne committed Oct 2, 2020
1 parent bbc310f commit 29b01ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions inc/html.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,16 @@ static function formatNumber($number, $edit = false, $forcedecimal = -1) {
/**
* Make a good string from the unix timestamp $sec
*
* @param integer $time timestamp
* @param boolean $display_sec display seconds ?
* @param boolean $use_days use days for display ?
* @param int|float $time timestamp
* @param boolean $display_sec display seconds ?
* @param boolean $use_days use days for display ?
*
* @return string
**/
static function timestampToString($time, $display_sec = true, $use_days = true) {

$time = (float)$time;

$sign = '';
if ($time < 0) {
$sign = '- ';
Expand Down

0 comments on commit 29b01ad

Please sign in to comment.