Skip to content

Commit c58b2fd

Browse files
committed
Prevent empty delimeter (treat empty string as default)
1 parent 79daab3 commit c58b2fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dot.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
4747
public function __construct($items = [], $delimiter = '.')
4848
{
4949
$this->items = $this->getArrayItems($items);
50-
$this->delimiter = $delimiter;
50+
$this->delimiter = strlen($delimiter) ? $delimiter : '.';
5151
}
5252

5353
/**

0 commit comments

Comments
 (0)