diff --git a/.phpstan.dist.baseline.neon b/.phpstan.dist.baseline.neon index 08f066bb2b0..18291848aca 100644 --- a/.phpstan.dist.baseline.neon +++ b/.phpstan.dist.baseline.neon @@ -2710,11 +2710,6 @@ parameters: count: 2 path: app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php - - - message: "#^Method Mage_Directory_Model_Region\\:\\:loadByName\\(\\) invoked with 1 parameter, 2 required\\.$#" - count: 1 - path: app/code/core/Mage/Customer/Model/Customer.php - - message: "#^Parameter \\#1 \\$data \\(stdClass\\) of method Mage_Customer_Model_Customer_Api_V2\\:\\:_prepareData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Customer_Model_Customer_Api\\:\\:_prepareData\\(\\)$#" count: 1 diff --git a/app/code/core/Mage/Customer/Model/Customer.php b/app/code/core/Mage/Customer/Model/Customer.php index 6d9dede2b12..a81cbcb0e4f 100644 --- a/app/code/core/Mage/Customer/Model/Customer.php +++ b/app/code/core/Mage/Customer/Model/Customer.php @@ -1416,7 +1416,7 @@ public function validateAddress(array $data, $type = 'billing') return false; } - $region = Mage::getModel('directory/region')->loadByName($data[$prefix . 'region']); + $region = Mage::getModel('directory/region')->loadByName($data[$prefix . 'region'], $data[$prefix . $field]); if (!$region->getId()) { return false; }