-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
There are no shipping description when buying the virtual product so it wil comes up the exception error and crash the riskfied review flow.
The error happens at 586 of vendor/riskified/magento2new/Model/Api/Order/Helper.php
public function getShippingLines()
{
return [
[
'price' => floatval($this->getOrder()->getShippingAmount()),
'title' => strip_tags($this->getOrder()->getShippingDescription()),
'code' => $this->getOrder()->getShippingMethod()
]
];
}It should be checked the value first in php 8
public function getShippingLines()
{
return [
[
'price' => floatval($this->getOrder()->getShippingAmount()),
'title' => is_null($this->getOrder()->getShippingDescription()) ? '' : strip_tags($this->getOrder()->getShippingDescription()),
'code' => $this->getOrder()->getShippingMethod()
]
];
}Currently results in an error:
Order.CRITICAL: Exception: Deprecated Functionality: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecatedMetadata
Metadata
Assignees
Labels
No labels