Skip to content

Commit

Permalink
Prevent empty delimeter (treat empty string as default)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsah committed Oct 14, 2022
1 parent 79daab3 commit c58b2fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dot.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
public function __construct($items = [], $delimiter = '.')
{
$this->items = $this->getArrayItems($items);
$this->delimiter = $delimiter;
$this->delimiter = strlen($delimiter) ? $delimiter : '.';
}

/**
Expand Down

0 comments on commit c58b2fd

Please sign in to comment.