fixing bug with nameless entry when no macs available

This commit is contained in:
sandbender 2010-03-21 22:55:18 +01:00
parent 1e394ded75
commit 1e472392e7

View File

@ -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();