Skip to content

Commit 7aaf046

Browse files
authored
Fixed a bug where $path was of type integer and did not contain the key value of the element. To do this, I received a key from $kvp. (#43)
1 parent 9fe1d63 commit 7aaf046

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/KV/KVClient.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ public function Tree(string $prefix = '', ?QueryOptions $opts = null): array
294294
}
295295

296296
$treeHierarchy = [];
297-
foreach ($valueList as $path => $kvp) {
297+
/** @var KVPair $kvp */
298+
foreach ($valueList as $kvp) {
299+
$path = $kvp->getKey();
298300
$slashPos = strpos($path, '/');
299301
if (false === $slashPos) {
300302
$treeHierarchy[$path] = $kvp;

0 commit comments

Comments
 (0)