diff --git a/image.php b/image.php
index e2f0446..c15f761 100644
--- a/image.php
+++ b/image.php
@@ -19,6 +19,7 @@ class image extends objectStructs
public function __construct($vars)
{
+ $this->Log(__FUNCTION__ . " load image object with: ".print_r($vars,true));
if (is_array($vars))
{
$this->imageName = (isset($vars['image']) ? $vars['image'] :
@@ -38,6 +39,8 @@ class image extends objectStructs
$annotations = $vars['imageBasic']->annotations;
elseif (isset($vars['annotations']))
$annotations = $vars['annotations'];
+ else
+ $annotations = array();
$this->annotations = new imageAnnotations($annotations);
if (isset($vars['imageConfig']))
diff --git a/imageAnnotations.php b/imageAnnotations.php
index 2411590..821d1df 100644
--- a/imageAnnotations.php
+++ b/imageAnnotations.php
@@ -19,10 +19,12 @@ class imageAnnotations extends objectStructs
public function __construct($Result = null)
{
parent::__construct($Result);
- if ($this->roles and empty($this->roles) )
- {
- $this->roles = explode(',',$this->roles);
- }
+
+ $this->Log(__FUNCTION__ . " Load imageAnnotations with".print_r($Result,true));
+ if (is_string($Result->roles))
+ $this->roles = explode(',',$Result->roles);
+
+
}
public function hasRole( string $Role)
diff --git a/podmanImageManager.php b/podmanImageManager.php
index c0e3811..e30f17b 100644
--- a/podmanImageManager.php
+++ b/podmanImageManager.php
@@ -114,6 +114,7 @@ class podmanImageManager implements podmanImageManagerInterface
try {
$ImageRaw = $this->doRequest($ImageManifestURL, null, array('Accept: application/vnd.oci.image.manifest.v1+json'),true);
// echo "
image maniest
".print_r($ImageRaw,true).""; + } catch (\Exception $e) { @@ -130,6 +131,8 @@ class podmanImageManager implements podmanImageManagerInterface $Image = new image( array('name'=>$ImageNameComplete, 'imageBasic'=>$ImageRaw, 'imageConfig'=>$ImageConfigRaw)); if ($Image) { + file_put_contents('/var/www/vhosts/whmcsbeta.u2-web.com/httpdocs/modules/servers/iniApp_WHMCS/log.txt', "image: ".print_r($Image,true), FILE_APPEND); + if ($imageTag === $tag ) return $Image; }