Skip to content

Commit

Permalink
Merge pull request #1 from myurasov/patch-1
Browse files Browse the repository at this point in the history
Avoid undefined offset notice
  • Loading branch information
brianlmoon committed Mar 10, 2014
2 parents c4c2e04 + 397507b commit 28abf3e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gearmand_status.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@
foreach($proc as $id=>$w) {

foreach($w["abilities"] as $a){

$workers[$w["ip"]]["abilities"][$a]++;

if (isset($workers[$w["ip"]]["abilities"][$a])) {
$workers[$w["ip"]]["abilities"][$a]++;
} else {
$workers[$w["ip"]]["abilities"][$a] = 1;
}

$total_job_status[$a]["capable_workers"]++;

}
Expand Down

0 comments on commit 28abf3e

Please sign in to comment.