Fix the array_find call

This commit is contained in:
Alex Tselegidis 2024-04-15 18:22:28 +02:00
parent 01ddd00554
commit 363ddeede7
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ if (!function_exists('array_find')) {
throw new InvalidArgumentException('No filter function provided.'); throw new InvalidArgumentException('No filter function provided.');
} }
return array_filter($array, $callback)[0] ?? null; return array_values(array_filter($array, $callback))[0] ?? null;
} }
} }