Skip to content

Commit abb1b23

Browse files
authored
Merge pull request #683 from wernerkrauss/fix-some-php72-issues
Merged #683
2 parents fa6fd63 + 1609669 commit abb1b23

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

code/cart/ShoppingCart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ protected static function build_url($action, $buyable, $params = array())
566566
*
567567
* you will need to decode the url with javascript before using it.
568568
*/
569-
protected static function params_to_get_string($array)
569+
protected static function params_to_get_string(array $array)
570570
{
571-
if ($array & count($array > 0)) {
571+
if ($array && count($array) > 0) {
572572
array_walk($array, create_function('&$v,$k', '$v = $k."=".$v ;'));
573573
return "?" . implode("&", $array);
574574
}

code/cms/ShopConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getCountriesList($prefixisocode = false)
8181
asort($countries);
8282
if ($allowed = $this->owner->AllowedCountries) {
8383
$allowed = explode(",", $allowed);
84-
if (count($allowed > 0)) {
84+
if (count($allowed) > 0) {
8585
$countries = array_intersect_key($countries, array_flip($allowed));
8686
}
8787
}

code/model/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public function getDefaultSearchContext()
299299
/**
300300
* Hack for swapping out relation list with OrderItemList
301301
*/
302-
public function getComponents($componentName, $filter = "", $sort = "", $join = "", $limit = null)
302+
public function getComponents($componentName, $filter = null, $sort = null, $join = null, $limit = null)
303303
{
304304
$components = parent::getComponents($componentName, $filter = "", $sort = "", $join = "", $limit = null);
305305
if ($componentName === "Items" && get_class($components) !== "UnsavedRelationList") {

code/product/Product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ public function isOrphaned()
382382
return false;
383383
}
384384

385-
public function Link()
385+
public function Link($action = null)
386386
{
387-
$link = parent::Link();
387+
$link = parent::Link($action);
388388
$this->extend('updateLink', $link);
389389
return $link;
390390
}

0 commit comments

Comments
 (0)