From 363ddeede7fb13e1d8b28636dc7878dd9259185a Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 15 Apr 2024 18:22:28 +0200 Subject: [PATCH] Fix the array_find call --- application/helpers/array_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }