Enhanced docker edit box [5]

Avoid error when no dockers existing
This commit is contained in:
bergware
2016-05-16 13:52:33 +02:00
parent 0d3d24445e
commit cc13536d57
@@ -429,6 +429,7 @@ function getUsedPorts() {
global $dockerManPaths;
$docker = new DockerClient();
$docker = $docker->getDockerContainers();
if (!$docker) $docker = [];
$names = $ports = [];
foreach ($docker as $ct) $names[] = strtolower($ct['Name']);
foreach (glob($dockerManPaths['templates-user'].'/*.xml',GLOB_NOSORT) as $file) {