diff --git a/application/helpers/array_helper.php b/application/helpers/array_helper.php index 1f47c14e..2381f894 100644 --- a/application/helpers/array_helper.php +++ b/application/helpers/array_helper.php @@ -48,7 +48,7 @@ if (!function_exists('array_find')) { throw new InvalidArgumentException('No filter function provided.'); } - return array_filter($array, $callback)[0] ?? null; + return array_values(array_filter($array, $callback))[0] ?? null; } }