mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 01:44:04 +00:00
Fix #28 associative arrays being converted into objects
This commit is contained in:
parent
0bb18bb11a
commit
7fc89271f3
2 changed files with 12 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ class TenantManager
|
|||
return $this->jsonDecodeArrayValues($this->storage->getMany($uuid, $key));
|
||||
}
|
||||
|
||||
return json_decode($this->storage->get($uuid, $key));
|
||||
return json_decode($this->storage->get($uuid, $key), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -259,7 +259,7 @@ class TenantManager
|
|||
}
|
||||
|
||||
if (! is_null($value)) {
|
||||
return $target[$key] = json_decode($this->storage->put($uuid, $key, json_encode($value)));
|
||||
return $target[$key] = json_decode($this->storage->put($uuid, $key, json_encode($value)), true);
|
||||
}
|
||||
|
||||
if (! is_array($key)) {
|
||||
|
|
@ -290,7 +290,7 @@ class TenantManager
|
|||
protected function jsonDecodeArrayValues(array $array)
|
||||
{
|
||||
array_walk($array, function (&$value, $key) {
|
||||
$value = json_decode($value);
|
||||
$value = json_decode($value, true);
|
||||
});
|
||||
|
||||
return $array;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue