Skip to content

Commit 3aa22b9

Browse files
committed
MAGETWO-64499: Error during deploying using " auto_increment_increment = 3" as Mysql option
1 parent 0dcef95 commit 3aa22b9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/code/Magento/Tax/Setup/InstallData.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
147147
* Return region id by code.
148148
*
149149
* @param string $regionCode
150-
* @return mixed
150+
* @return string
151151
*/
152152
private function getRegionId($regionCode)
153153
{
@@ -158,6 +158,13 @@ private function getRegionId($regionCode)
158158
->addRegionCodeOrNameFilter(['CA', 'NY']);
159159
}
160160

161-
return $this->regionCollection->getItemByColumnValue('code', $regionCode)->getId();
161+
$regionId = '';
162+
/** @var $item */
163+
$item = $this->regionCollection->getItemByColumnValue('code', $regionCode);
164+
if ($item) {
165+
$regionId = $item->getId();
166+
}
167+
168+
return $regionId;
162169
}
163170
}

0 commit comments

Comments
 (0)