Skip to content

Commit

Permalink
Merge pull request #683 from wernerkrauss/fix-some-php72-issues
Browse files Browse the repository at this point in the history
Merged #683
  • Loading branch information
bummzack authored Sep 18, 2018
2 parents fa6fd63 + 1609669 commit abb1b23
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/cart/ShoppingCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ protected static function build_url($action, $buyable, $params = array())
*
* you will need to decode the url with javascript before using it.
*/
protected static function params_to_get_string($array)
protected static function params_to_get_string(array $array)
{
if ($array & count($array > 0)) {
if ($array && count($array) > 0) {
array_walk($array, create_function('&$v,$k', '$v = $k."=".$v ;'));
return "?" . implode("&", $array);
}
Expand Down
2 changes: 1 addition & 1 deletion code/cms/ShopConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getCountriesList($prefixisocode = false)
asort($countries);
if ($allowed = $this->owner->AllowedCountries) {
$allowed = explode(",", $allowed);
if (count($allowed > 0)) {
if (count($allowed) > 0) {
$countries = array_intersect_key($countries, array_flip($allowed));
}
}
Expand Down
2 changes: 1 addition & 1 deletion code/model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function getDefaultSearchContext()
/**
* Hack for swapping out relation list with OrderItemList
*/
public function getComponents($componentName, $filter = "", $sort = "", $join = "", $limit = null)
public function getComponents($componentName, $filter = null, $sort = null, $join = null, $limit = null)
{
$components = parent::getComponents($componentName, $filter = "", $sort = "", $join = "", $limit = null);
if ($componentName === "Items" && get_class($components) !== "UnsavedRelationList") {
Expand Down
4 changes: 2 additions & 2 deletions code/product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ public function isOrphaned()
return false;
}

public function Link()
public function Link($action = null)
{
$link = parent::Link();
$link = parent::Link($action);
$this->extend('updateLink', $link);
return $link;
}
Expand Down

0 comments on commit abb1b23

Please sign in to comment.