From b292e10c1328064b66a7168eaf9e86d67db20778 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; } }