From 45bb084ae5f3915c7e1bc4e758819c72008e557d Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 11 Jun 2022 14:45:46 +0200 Subject: [PATCH] allow to use it even if no channel was provided Signed-off-by: szaimen --- php/src/Docker/DockerActionManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0d203bda..812d93ca 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -431,6 +431,10 @@ class DockerActionManager $tagArray = explode(':', $output['Config']['Image']); $tag = $tagArray[1]; apcu_add($cacheKey, $tag); + if ($tag === null) { + error_log("No tag was found when getting the current channel. You probably did not follow the documentation correctly. Changing the channel to the default 'latest'."); + $tag = 'latest'; + } return $tag; } catch (\Exception $e) { error_log('Could not get current channel ' . $e->getMessage());