Skip to content

Commit 0ad1683

Browse files
committed
fix: phpstan analyze error in array_helper
1 parent a40f7a5 commit 0ad1683

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)