-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Prerequisites
- [x ] I have my server set up correctly.
- [x ] I am using a supported version of Magento 2.
Versions
Magento 2 version: 2.4.6-p3
PHP version: 8.2
Issue
Problem description:
Exception: Deprecated Functionality: trim(): Passing null to parameter ($string) of type string is deprecated in /www/html/vendor/qenta/magento2-qcp/Model/AbstractPayment.php on line 576
If instructions are empty the function below pass null to trim, and this is not allowed anymore.
Maybe there are some more trims where a null value can happend.
We should change this:
public function getInstructions()
{
return trim($this->getConfigData('instructions'));
}
to:
public function getInstructions()
{
return trim($this->getConfigData('instructions') ?? '');
}
Steps to reproduce:
Activate module and payment method, leave instruction field blank, go to cart. Check debug or system log, the error message should appeare.
Metadata
Metadata
Assignees
Labels
No labels