Hey, if you call listSubdirs('/', true) in etcd/src/Client.php it works great but if you call listSubdirs('/', false) again you*ll get listSubdirs('/', true). I think the problem lives in traversalDir() method in etcd/src/Client.php. It stores in $this->dir globaly.
My quick fix would be:
public function listSubdirs($key = '/', $recursive = false)
{
try {
$data = $this->dirInfo($key, $recursive);
} catch (EtcdException $e) {
throw $e;
}
$iterator = new RecursiveArrayIterator($data);
//reset iterator array
$this->dirs = [];
return $this->traversalDir($iterator);
}
Hey, if you call
listSubdirs('/', true)inetcd/src/Client.phpit works great but if you calllistSubdirs('/', false)again you*ll getlistSubdirs('/', true). I think the problem lives intraversalDir()method inetcd/src/Client.php. It stores in $this->dir globaly.My quick fix would be: