Skip to content
Code-Schnipsel Gruppen Projekte
Commit 7c9a1904 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next-2.x' into 'main'

fix: consider null at canUsedWithAddress (old code)

See merge request !44
Übergeordnete f46beb0b 6d24f6f4
Branches next-3.x
No related tags found
2 Merge Requests!44fix: consider null at canUsedWithAddress (old code),!43Update 'next-3.x' with latest changes from 'main'
Pipeline #12896 mit Warnungen bestanden mit Phase
in 45 Sekunden
......@@ -8,6 +8,7 @@
use QUI;
use QUI\CRUD\Factory;
use QUI\ERP\Address;
use QUI\ERP\Areas\Utils as AreaUtils;
use QUI\ERP\Products\Handler\Fields;
use QUI\ERP\Products\Handler\Products;
......@@ -333,11 +334,15 @@ public function canUsedBy(QUI\Interfaces\Users\User $User): bool
/**
* Is this shipping rule allowed for this address?
*
* @param QUI\ERP\Address|QUI\Users\Address $Address
* @param Address|QUI\Users\Address|null $Address
* @return bool
*/
public function canUsedWithAddress(QUI\ERP\Address|QUI\Users\Address $Address): bool
public function canUsedWithAddress(QUI\ERP\Address|QUI\Users\Address $Address = null): bool
{
if (!$Address) {
return false;
}
$areasValue = $this->getAttribute('areas');
if ($areasValue) {
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren