Skip to content

Commit

Permalink
Avoid undefined variable notice
Browse files Browse the repository at this point in the history
  • Loading branch information
myurasov committed Nov 27, 2013
1 parent c4c2e04 commit 397507b
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 397507b

Please sign in to comment.