From 2b949cda4bf7a22fa526e12db78901a5a714a6ae Mon Sep 17 00:00:00 2001 From: Jonathan Kraut Date: Mon, 15 Feb 2021 13:28:31 +0100 Subject: [PATCH] use func_get_args to pass array_prepend call through to Arr::prepend to ensure correct handling of $key argument --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.php b/src/helpers.php index ed871d7..54723ed 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -199,7 +199,7 @@ function array_pluck($array, $value, $key = null) */ function array_prepend($array, $value, $key = null) { - return Arr::prepend($array, $value, $key); + return Arr::prepend(...func_get_args()); } }