Unambiguously typecast to expected datatype

This commit is contained in:
billz 2023-09-03 09:46:50 +02:00
parent cc6fa1d8d0
commit 5457855aa1
2 changed files with 2 additions and 1 deletions

View file

@ -9,6 +9,7 @@ if (isset($_POST['interface'])) {
define( 'NL80211_BAND_24GHZ', 0x1 );
define( 'NL80211_BAND_5GHZ', 0x2 );
$iface = escapeshellcmd($_POST['interface']);
$flags = 0;
// get physical device for selected interface
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);

View file

@ -49,7 +49,7 @@ class Sysinfo
public function usedMemory()
{
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
return floor($used);
return floor(intval($used));
}
public function processorCount()