Skip to content

Commit

Permalink
Merge pull request #700 from bummzack/pr/fix-create-func
Browse files Browse the repository at this point in the history
Fix deprecated usage of `create_function`
  • Loading branch information
wilr authored Dec 6, 2018
2 parents abb1b23 + 7544e9c commit 1bc44e9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/cart/ShoppingCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}

/**
Expand Down

0 comments on commit 1bc44e9

Please sign in to comment.