Fix invalid foreach warning in player view when no players found.

I haven't looked much at the code yet so I'm not too sure if this agrees with your style.

Truthiness `if ($var)` seemed adequate and clean for this test, of course `if (FALSE !== $var)` may be safer.