private function dbRowToMountInfo(array $row) {
$user = $this->userManager->get($row['user_id']);
+ if (is_null($user)) {
+ return null;
+ }
return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $row['mount_id'], isset($row['path'])? $row['path']:'');
}
$rows = $query->execute()->fetchAll();
- $this->mountsForUsers[$user->getUID()] = array_map([$this, 'dbRowToMountInfo'], $rows);
+ $this->mountsForUsers[$user->getUID()] = array_filter(array_map([$this, 'dbRowToMountInfo'], $rows));
}
return $this->mountsForUsers[$user->getUID()];
}
$rows = $query->execute()->fetchAll();
- return array_map([$this, 'dbRowToMountInfo'], $rows);
+ return array_filter(array_map([$this, 'dbRowToMountInfo'], $rows));
}
/**
$rows = $query->execute()->fetchAll();
- return array_map([$this, 'dbRowToMountInfo'], $rows);
+ return array_filter(array_map([$this, 'dbRowToMountInfo'], $rows));
}
/**