Skip to content
Snippets Groups Projects
Commit 1db80fc6 authored by Ievgen Shakhsuvarov's avatar Ievgen Shakhsuvarov
Browse files

MAGETWO-86743: Optimization: magento/module-tax is_null change to strict comparison #13170

 - Merge Pull Request magento/magento2#13170 from Coderimus/magento2:fix/tax-optimization-change-isnull
 - Merged commits:
   1. 50238bb5
parents 8848d94a 50238bb5
Branches
No related merge requests found
......@@ -227,7 +227,7 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements T
*/
public function saveTitles($titles = null)
{
if (is_null($titles)) {
if ($titles === null) {
$titles = $this->getTitle();
}
......@@ -256,7 +256,7 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements T
*/
public function getTitleModel()
{
if (is_null($this->_titleModel)) {
if ($this->_titleModel === null) {
$this->_titleModel = $this->_titleFactory->create();
}
return $this->_titleModel;
......@@ -270,7 +270,7 @@ class Rate extends \Magento\Framework\Model\AbstractExtensibleModel implements T
if ($this->getData(self::KEY_TITLES)) {
return $this->getData(self::KEY_TITLES);
}
if (is_null($this->_titles)) {
if ($this->_titles === null) {
$this->_titles = $this->getTitleModel()->getCollection()->loadByRateId($this->getId())->getItems();
}
return $this->_titles;
......
......@@ -771,7 +771,7 @@ class CommonTaxCollector extends AbstractTotal
$previouslyAppliedTaxes[$row['id']] = $row;
}
if (!is_null($row['percent'])) {
if ($row['percent'] !== null) {
$row['percent'] = $row['percent'] ? $row['percent'] : 1;
$rate = $rate ? $rate : 1;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment