Skip to content

Commit cef3fe7

Browse files
fix static
1 parent ab97e97 commit cef3fe7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/Magento/Dhl/Model/Carrier.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,9 +1768,8 @@ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '')
17681768
*/
17691769
$nodeShipmentDetails->addChild('DoorTo', 'DD');
17701770
$nodeShipmentDetails->addChild('DimensionUnit', substr($this->_getDimensionUnit(), 0, 1));
1771-
if ($package['params']['container'] == self::DHL_CONTENT_TYPE_NON_DOC) {
1772-
$packageType = 'CP';
1773-
}
1771+
$contentType = isset($package['params']['container']) ? $package['params']['container'] : '';
1772+
$packageType = $contentType === self::DHL_CONTENT_TYPE_NON_DOC ? 'CP' : '';
17741773
$nodeShipmentDetails->addChild('PackageType', $packageType);
17751774
if ($this->isDutiable($rawRequest->getOrigCountryId(), $rawRequest->getDestCountryId())) {
17761775
$nodeShipmentDetails->addChild('IsDutiable', 'Y');

0 commit comments

Comments
 (0)