Docker: suppress PHP warning

This commit is contained in:
bergware
2019-01-17 10:24:32 +01:00
parent df3e1d9202
commit b4a1472a2f

View File

@@ -277,7 +277,7 @@ class DockerTemplates {
if ($ct['Running']) {
$port = &$ct['Ports'][0];
$ip = ($ct['NetworkMode']=='host'||$port['NAT'] ? $host : $port['IP']);
$tmp['url'] = strpos($tmp['url'],$ip)!==false ? $tmp['url'] : $this->getControlURL($ct, $ip);
$tmp['url'] = strpos($tmp['url'] ?: '',$ip)!==false ? $tmp['url'] : $this->getControlURL($ct, $ip);
$tmp['shell'] = $tmp['shell'] ?? $this->getTemplateValue($image, 'Shell');
}
$tmp['registry'] = $tmp['registry'] ?? $this->getTemplateValue($image, 'Registry');