Skip to content

Commit d7c7b6b

Browse files
authored
Merge pull request magento#1113 from magento-engcom/develop-prs
[EngCom] Public Pull Requests
2 parents e513ab5 + 9eac6e8 commit d7c7b6b

File tree

4 files changed

+29
-40
lines changed

4 files changed

+29
-40
lines changed

app/code/Magento/Catalog/Setup/InstallSchema.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,18 +2022,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
20222022
'attribute_id',
20232023
\Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
20242024
)
2025-
->addForeignKey(
2026-
$installer->getFkName(
2027-
'catalog_product_entity_media_gallery',
2028-
'entity_id',
2029-
'catalog_product_entity',
2030-
'entity_id'
2031-
),
2032-
'entity_id',
2033-
$installer->getTable('catalog_product_entity'),
2034-
'entity_id',
2035-
\Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
2036-
)
20372025
->setComment(
20382026
'Catalog Product Media Gallery Attribute Backend Table'
20392027
);

app/code/Magento/Eav/Setup/EavSetup.php

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,35 +1002,36 @@ private function _updateAttributeAdditionalData($entityTypeId, $id, $field, $val
10021002
return $this;
10031003
}
10041004
$additionalTableExists = $this->setup->getConnection()->isTableExists($this->setup->getTable($additionalTable));
1005-
if ($additionalTable && $additionalTableExists) {
1006-
$attributeFields = $this->setup->getConnection()->describeTable($this->setup->getTable($additionalTable));
1007-
if (is_array($field)) {
1008-
$bind = [];
1009-
foreach ($field as $k => $v) {
1010-
if (isset($attributeFields[$k])) {
1011-
$bind[$k] = $this->setup->getConnection()->prepareColumnValue($attributeFields[$k], $v);
1012-
}
1013-
}
1014-
if (!$bind) {
1015-
return $this;
1016-
}
1017-
$field = $bind;
1018-
} else {
1019-
if (!isset($attributeFields[$field])) {
1020-
return $this;
1005+
if (!$additionalTableExists) {
1006+
return $this;
1007+
}
1008+
$attributeFields = $this->setup->getConnection()->describeTable($this->setup->getTable($additionalTable));
1009+
if (is_array($field)) {
1010+
$bind = [];
1011+
foreach ($field as $k => $v) {
1012+
if (isset($attributeFields[$k])) {
1013+
$bind[$k] = $this->setup->getConnection()->prepareColumnValue($attributeFields[$k], $v);
10211014
}
10221015
}
1023-
$this->setup->updateTableRow(
1024-
$this->setup->getTable($additionalTable),
1025-
'attribute_id',
1026-
$this->getAttributeId($entityTypeId, $id),
1027-
$field,
1028-
$value
1029-
);
1030-
1031-
$attribute = $this->getAttribute($entityTypeId, $id);
1032-
$this->updateCachedRow($field, $value, $attribute);
1016+
if (!$bind) {
1017+
return $this;
1018+
}
1019+
$field = $bind;
1020+
} else {
1021+
if (!isset($attributeFields[$field])) {
1022+
return $this;
1023+
}
10331024
}
1025+
$this->setup->updateTableRow(
1026+
$this->setup->getTable($additionalTable),
1027+
'attribute_id',
1028+
$this->getAttributeId($entityTypeId, $id),
1029+
$field,
1030+
$value
1031+
);
1032+
1033+
$attribute = $this->getAttribute($entityTypeId, $id);
1034+
$this->updateCachedRow($field, $value, $attribute);
10341035

10351036
return $this;
10361037
}

app/code/Magento/Sales/Model/ResourceModel/Order/Status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @author Magento Core Team <[email protected]>
1919
*/
20-
class Status extends \Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb
20+
class Status extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
2121
{
2222
/**
2323
* Status labels table

setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
111111
. PHP_EOL . 'In "default" and "developer" modes static contents are being deployed '
112112
. 'automatically on demand.'
113113
. PHP_EOL . 'If you still want to deploy in these modes, use -f option: '
114-
. "'bin/magento setup:deploy:static-content -f'"
114+
. "'bin/magento setup:static-content:deploy -f'"
115115
)
116116
);
117117
}

0 commit comments

Comments
 (0)