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 b9ee1a7 commit 5b8a57dCopy full SHA for 5b8a57d
1 file changed
src/Database/Document.php
@@ -35,11 +35,11 @@ public function __construct(array $input = [])
35
throw new StructureException('$permissions must be of type array');
36
}
37
38
- foreach ($input as $key => $value) {
+ foreach ($input as $key => &$value) {
39
if (!\is_array($value)) {
40
continue;
41
42
- if (isset($value['$id']) || isset($value['$collection'])) {
+ if ((isset($value['$id']) || isset($value['$collection']))) {
43
$input[$key] = new self($value);
44
45
@@ -48,10 +48,10 @@ public function __construct(array $input = [])
48
$value[$childKey] = new self($child);
49
50
51
-
52
- $input[$key] = $value;
53
54
+ unset($value); // Unset Reference
+
55
parent::__construct($input);
56
57
0 commit comments