From bcfeedc703aeabd007d365b314c37669cb2dc2ec Mon Sep 17 00:00:00 2001 From: Lukas Rosenstock Date: Thu, 22 Oct 2026 09:07:16 +0000 Subject: [PATCH] Minor refactoring to avoid deprecated function --- CloudObjects/SDK/ObjectRetriever.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CloudObjects/SDK/ObjectRetriever.php b/CloudObjects/SDK/ObjectRetriever.php index 300853f..6df451a 100644 --- a/CloudObjects/SDK/ObjectRetriever.php +++ b/CloudObjects/SDK/ObjectRetriever.php @@ -635,10 +635,10 @@ class ObjectRetriever implements CustomCacheAndLogInterface { */ public function get($coid) { if (is_string($coid)) - return $this->getObject(new IRI($coid)); + return $this->getObjectNode(new IRI($coid)); if (is_object($coid) && get_class($coid)=='ML\IRI\IRI') - return $this->getObject($coid); + return $this->getObjectNode($coid); throw new SDKException('COID must be passed as a string or an IRI object.'); } @@ -650,7 +650,7 @@ class ObjectRetriever implements CustomCacheAndLogInterface { * @param string $filename */ public function getAttachment(IRI $coid, $filename) { - $object = $this->getObject($coid); + $object = $this->getObjectNode($coid); if (!$object) // Cannot get attachment for non-existing object @@ -687,7 +687,7 @@ class ObjectRetriever implements CustomCacheAndLogInterface { } - return $fileContent; + return $fileContent ?? null; } private function assertAuthenticatingNamespaceAndGetId() : IRI { @@ -709,7 +709,7 @@ class ObjectRetriever implements CustomCacheAndLogInterface { * @return Node */ public function getAuthenticatingNamespaceObject() : ?Node { - return $this->getObject($this->assertAuthenticatingNamespaceAndGetId()); + return $this->getObjectNode($this->assertAuthenticatingNamespaceAndGetId()); } /** @@ -719,7 +719,7 @@ class ObjectRetriever implements CustomCacheAndLogInterface { * @return Node */ public function getAuthenticatingNamespaceObjectNode() : ?Node { - return $this->getObject($this->assertAuthenticatingNamespaceAndGetId()); + return $this->getObjectNode($this->assertAuthenticatingNamespaceAndGetId()); } /**