planetteamspeak / ts3phpframework

Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
https://www.planetteamspeak.com
GNU General Public License v3.0
212 stars 59 forks source link

FCPATH/vendor/planetteamspeak/ts3-php-framework/src/Helper/Convert.php at line 94 #194

Closed Grepher76380 closed 1 year ago

Grepher76380 commented 1 year ago

$data['virtualserver_uptime'] = Convert::seconds($ts3->virtualserver_uptime);

error : Implicit conversion from float 144.08388888888888 to int loses precision

FCPATH/vendor/planetteamspeak/ts3-php-framework/src/Helper/Convert.php at line 94

87 */ 88 public static function seconds(int $seconds, bool $is_ms = false, string $format = "%dD %02d:%02d:%02d"): string 89 { 90 if ($is_ms) { 91 $seconds = $seconds / 1000; 92 } 93 94 return sprintf($format, $seconds / 60 / 60 / 24, ($seconds / 60 / 60) % 24, ($seconds / 60) % 60, $seconds % 60); 95 } 96 97 /* 98 Converts a given codec ID to a human-readable name. 99 100 @param integer $codec 101 * @return string

Sebbo94BY commented 1 year ago

Fixed by PR #202.