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