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
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!44fix: consider null at canUsedWithAddress (old code),!43Update 'next-3.x' with latest changes from 'main'
Pipeline-Nr. 12896 mit Warnungen bestanden
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
use QUI; use QUI;
use QUI\CRUD\Factory; use QUI\CRUD\Factory;
use QUI\ERP\Address;
use QUI\ERP\Areas\Utils as AreaUtils; use QUI\ERP\Areas\Utils as AreaUtils;
use QUI\ERP\Products\Handler\Fields; use QUI\ERP\Products\Handler\Fields;
use QUI\ERP\Products\Handler\Products; use QUI\ERP\Products\Handler\Products;
...@@ -333,11 +334,15 @@ public function canUsedBy(QUI\Interfaces\Users\User $User): bool ...@@ -333,11 +334,15 @@ public function canUsedBy(QUI\Interfaces\Users\User $User): bool
/** /**
* Is this shipping rule allowed for this address? * 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 * @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'); $areasValue = $this->getAttribute('areas');
if ($areasValue) { if ($areasValue) {
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren