Skip to content

Commit

Permalink
Fixed a bug where $path was of type integer and did not contain the k…
Browse files Browse the repository at this point in the history
…ey value of the element. To do this, I received a key from $kvp. (#43)
  • Loading branch information
Perovmpr authored Dec 21, 2023
1 parent 9fe1d63 commit 7aaf046
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/KV/KVClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ public function Tree(string $prefix = '', ?QueryOptions $opts = null): array
}

$treeHierarchy = [];
foreach ($valueList as $path => $kvp) {
/** @var KVPair $kvp */
foreach ($valueList as $kvp) {
$path = $kvp->getKey();
$slashPos = strpos($path, '/');
if (false === $slashPos) {
$treeHierarchy[$path] = $kvp;
Expand Down

0 comments on commit 7aaf046

Please sign in to comment.