Skip to content

Commit 9faa9b4

Browse files
committed
Fix implicit float to int conversion
1 parent f1dae7d commit 9faa9b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

backend/sys_infos.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2-
error_reporting(E_ALL);
3-
ini_set ('display_errors', 'On');
2+
if(isset($_GET["debug"])){
3+
error_reporting(E_ALL);
4+
ini_set ('display_errors', 'On');
5+
}
46
// Authorization
57
session_start();
68
if(!isset($_SESSION["rpidbauth"])){
@@ -14,7 +16,7 @@
1416
// Uptime
1517
$uptime = shell_exec("cat /proc/uptime");
1618
$uptime = explode(" ", $uptime);
17-
$uptime = $uptime[0];
19+
$uptime = (int) $uptime[0];
1820
$y = floor($uptime / 60 / 60 / 24 / 365);
1921
$d = floor($uptime / 60 / 60 / 24) % 365;
2022
$h = floor(($uptime / 3600) % 24);

0 commit comments

Comments
 (0)