From 701e028a359475787adf24726da6d48db4cabfa7 Mon Sep 17 00:00:00 2001 From: plumbeo Date: Wed, 23 Aug 2017 13:03:28 +0200 Subject: Captive portal: fix idle times in details popup Explicitly cast $idle_time to integer. (cherry picked from commit 07df3494bd9a508e568b4ae999369ec8b2d14ec2) --- src/usr/local/www/status_captiveportal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index f0d3b8d..fb02b2b 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -97,11 +97,11 @@ function print_details($cpent) { $last_act = $last_act ? $last_act : $cpent[0]; $idle_time = time() - $last_act; - printf(gettext("Idle time: %s") . "
", convert_seconds_to_dhms($idle_time)); + printf(gettext("Idle time: %s") . "
", convert_seconds_to_dhms((int)$idle_time)); if (!empty($cpent[8])) { $idle_time_left = $last_act + $cpent[8] - time(); - printf(gettext("Idle time left: %s") . "
", convert_seconds_to_dhms($idle_time_left)); + printf(gettext("Idle time left: %s") . "
", convert_seconds_to_dhms((int)$idle_time_left)); } } -- cgit v1.1