Skip to content

Commit

Permalink
fix: allow dots inside column names
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Frey <[email protected]>
  • Loading branch information
lukas-frey committed Feb 22, 2023
1 parent b6d3976 commit e55b9b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Storage/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ class Memory
*/
public function set(string $model, string $key, mixed $value): void
{
Arr::set($this->memory, "{$model}.{$key}", $value);
if (!Arr::exists($this->memory, $model)) {
Arr::set($this->memory, $model, []);
}

// Key can contain dots, so we cannot use dot-syntax using Arr::set().
$this->memory[$model][$key] = $value;
}

/**
Expand Down

0 comments on commit e55b9b0

Please sign in to comment.