Skip to content

Commit

Permalink
fixing bug with nameless entry when no macs available
Browse files Browse the repository at this point in the history
  • Loading branch information
sandbender committed Mar 21, 2010
1 parent 1e394de commit 1e47239
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion macs.php
Expand Up @@ -36,5 +36,9 @@ function translator($mac) {

$macs = macs_get();
$macs = array_map("translator", $macs);
echo '["'.implode('", "', $macs).'"]';
if (count($macs) > 0) {
echo '["'.implode('", "', $macs).'"]';
} else {
echo '[]';
}
macs_purge();

0 comments on commit 1e47239

Please sign in to comment.