mirror of
https://github.com/unraid/webgui.git
synced 2026-04-20 00:30:39 -05:00
Fix getDockerJSON: If docker comms fail, return empty array (as expsected by everyone) instead if null. Fixes foreach() argument must be of type array|object, null given
This commit is contained in:
@@ -721,7 +721,7 @@ class DockerClient {
|
||||
$fp = stream_socket_client('unix:///var/run/docker.sock', $errno, $errstr);
|
||||
if ($fp === false) {
|
||||
echo "Couldn't create socket: [$errno] $errstr";
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
$protocol = $unchunk ? 'HTTP/1.0' : 'HTTP/1.1';
|
||||
$out = "$method {$api}{$url} $protocol\r\nHost:127.0.0.1\r\nConnection:Close\r\n";
|
||||
|
||||
Reference in New Issue
Block a user