Skip to content

Commit

Permalink
Fixed passing null is deprecated for trim in Mage_Tax_Model_Resource_…
Browse files Browse the repository at this point in the history
…Calculation (OpenMage#3299)
  • Loading branch information
kyrena committed Jun 4, 2023
1 parent 818b0e5 commit 820a805
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/code/core/Mage/Tax/Model/Resource/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class Mage_Tax_Model_Resource_Calculation extends Mage_Core_Model_Resource_Db_Ab
*
* @var array
*/
protected $_ratesCache = [];
protected $_ratesCache = [];

/**
* Primery key auto increment flag
*
* @var bool
*/
protected $_isPkAutoIncrement = false;
protected $_isPkAutoIncrement = false;

protected function _construct()
{
Expand Down Expand Up @@ -81,8 +81,8 @@ public function getRateInfo($request)
{
$rates = $this->_getRates($request);
return [
'process' => $this->getCalculationProcess($request, $rates),
'value' => $this->_calculateRate($rates)
'process' => $this->getCalculationProcess($request, $rates),
'value' => $this->_calculateRate($rates),
];
}

Expand Down Expand Up @@ -235,7 +235,7 @@ protected function _getRates($request)
$customerClassId = $request->getCustomerClassId();
$countryId = $request->getCountryId();
$regionId = $request->getRegionId();
$postcode = trim($request->getPostcode());
$postcode = trim((string)$request->getPostcode());

// Process productClassId as it can be array or usual value. Form best key for cache.
$productClassId = $request->getProductClassId();
Expand Down

0 comments on commit 820a805

Please sign in to comment.