mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Unambiguously typecast to expected datatype
This commit is contained in:
parent
cc6fa1d8d0
commit
5457855aa1
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue