Skip to content

Commit 9b810b8

Browse files
authored
Merge pull request #6637 from ddevsr/patch-1
2 parents f6dd565 + 0ad1683 commit 9b810b8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

system/Helpers/array_helper.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ function dot_array_search(string $index, array $array)
4646
function _array_search_dot(array $indexes, array $array)
4747
{
4848
// Grab the current index
49-
$currentIndex = $indexes ? array_shift($indexes) : null;
49+
$currentIndex = $indexes ? array_shift($indexes) : null;
50+
$intCurrentIndex = (int) $currentIndex;
5051

51-
if ((empty($currentIndex) && (int) $currentIndex !== 0) || (! isset($array[$currentIndex]) && $currentIndex !== '*')) {
52+
if (empty($currentIndex) && $intCurrentIndex !== 0 || (! isset($array[$currentIndex]) && $currentIndex !== '*')) {
5253
return null;
5354
}
5455

0 commit comments

Comments
 (0)