Skip to content

Commit e3a3b55

Browse files
test has path
1 parent 27ee09e commit e3a3b55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/DotNotation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ function unset_path(array &$haystack, string $path, string $separator = '.')
7272
*/
7373
function has_path(array $haystack, string $path, string $separator = '.'): bool
7474
{
75-
$key = trim($path, $separator);
76-
$keys = explode($separator, $key);
77-
if (empty($keys)) {
75+
$keys = explode($separator, $path);
76+
if (count($keys) === 0) {
7877
return false;
7978
}
8079

0 commit comments

Comments
 (0)