From 7544e9c3431516c9c1291dd639e0cb40ffd1b41f Mon Sep 17 00:00:00 2001 From: Roman Schmid Date: Thu, 6 Dec 2018 18:05:42 +0100 Subject: [PATCH] Fix deprecated usage of `create_function` --- code/cart/ShoppingCart.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/cart/ShoppingCart.php b/code/cart/ShoppingCart.php index 454e4f466..2906f941c 100644 --- a/code/cart/ShoppingCart.php +++ b/code/cart/ShoppingCart.php @@ -569,10 +569,9 @@ protected static function build_url($action, $buyable, $params = array()) protected static function params_to_get_string(array $array) { if ($array && count($array) > 0) { - array_walk($array, create_function('&$v,$k', '$v = $k."=".$v ;')); - return "?" . implode("&", $array); + return '?' . http_build_query($array); } - return ""; + return ''; } /**