We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0502936 commit dc9d203Copy full SHA for dc9d203
src/RemoteEntity/Cache/Cacher.php
@@ -38,10 +38,15 @@ public function fetch(
38
return $object;
39
}
40
41
- public function get(string $id, string $type): object
+ public function get(string $id, string $type): ?object
42
{
43
$objectId = $this->getObjectId($id, $type);
44
- return unserialize($this->kvStorageConfigAccessor->getKvStorage()->get($objectId));
+ $object = $this->kvStorageConfigAccessor->getKvStorage()->get($objectId);
45
+ if (empty($object)) {
46
+ return null;
47
+ }
48
+
49
+ return unserialize($object);
50
51
52
private function getObjectId(string $id, string $type): string
0 commit comments