Merge pull request #814 from nextcloud/enh/813/support-no-give-channel

allow to use it even if no channel was provided
This commit is contained in:
Simon L 2022-06-13 11:47:24 +02:00 committed by GitHub
commit 69382b638a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -431,6 +431,13 @@ class DockerActionManager
$tagArray = explode(':', $output['Config']['Image']); $tagArray = explode(':', $output['Config']['Image']);
$tag = $tagArray[1]; $tag = $tagArray[1];
apcu_add($cacheKey, $tag); apcu_add($cacheKey, $tag);
/**
* @psalm-suppress TypeDoesNotContainNull
*/
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; return $tag;
} catch (\Exception $e) { } catch (\Exception $e) {
error_log('Could not get current channel ' . $e->getMessage()); error_log('Could not get current channel ' . $e->getMessage());