Skip to content

Commit

Permalink
fix windows net
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Mar 19, 2018
1 parent 61859e8 commit 00b76fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/OS/Windows.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ public function getNet()
$return = [];

$perfRawData = $this->getInfo('PerfRawData_Tcpip_NetworkInterface');
$csv = $this->getInfo('NetworkAdapter');
$perfRawData = isset($perfRawData[0]) ? $perfRawData : [$perfRawData]; // if one NetworkInterface convert to many NetworkInterfaces
$networkAdapters = $this->getInfo('NetworkAdapter');

foreach ($csv as $net) {
foreach ($networkAdapters as $net) {
$return[$net['Name']] = array(
'recieved' => array(
'bytes' => 0,
Expand Down

0 comments on commit 00b76fb

Please sign in to comment.