mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 10:08:25 -05:00
Enhanced docker edit box [5]
Avoid error when no dockers existing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user