diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index 97a0e6aaebf4f..3ffc02a33254c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1315,16 +1315,12 @@ protected function getCustomOptionsData($productIds) } $options = $this->_optionColFactory->create(); /* @var \Magento\Catalog\Model\ResourceModel\Product\Option\Collection $options*/ - $options->addOrder('sort_order'); - $options->reset()->addOrder('sort_order')->addTitleToResult( - $storeId - )->addPriceToResult( - $storeId - )->addProductToFilter( - $productIds - )->addValuesToResult( - $storeId - ); + $options->reset(); + $options->addOrder('sort_order', 'ASC'); + $options->addTitleToResult($storeId); + $options->addPriceToResult($storeId); + $options->addProductToFilter($productIds); + $options->addValuesToResult($storeId); foreach ($options as $option) { $row = []; diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php index 44eba83d96d7e..12732f81f78a0 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php @@ -13,6 +13,9 @@ use Magento\Customer\Model\Metadata\Form; use Magento\Framework\Exception\LocalizedException; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class Save extends \Magento\Customer\Controller\Adminhtml\Index { /** @@ -268,6 +271,15 @@ public function execute() $this->_addSessionErrorMessages($messages); $this->_getSession()->setCustomerFormData($originalRequestData); $returnToEdit = true; + } catch (\Magento\Framework\Exception\AbstractAggregateException $exception) { + $errors = $exception->getErrors(); + $messages = []; + foreach ($errors as $error) { + $messages[] = $error->getMessage(); + } + $this->_addSessionErrorMessages($messages); + $this->_getSession()->setCustomerFormData($originalRequestData); + $returnToEdit = true; } catch (LocalizedException $exception) { $this->_addSessionErrorMessages($exception->getMessage()); $this->_getSession()->setCustomerFormData($originalRequestData); diff --git a/app/code/Magento/Vault/Setup/InstallSchema.php b/app/code/Magento/Vault/Setup/InstallSchema.php index 32e1d62754439..dd65f7a8c9772 100644 --- a/app/code/Magento/Vault/Setup/InstallSchema.php +++ b/app/code/Magento/Vault/Setup/InstallSchema.php @@ -90,13 +90,13 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con 'is_active', Table::TYPE_BOOLEAN, null, - ['nullable' => false, 'dafault' => true], + ['nullable' => false, 'default' => true], 'Is active flag' )->addColumn( 'is_visible', Table::TYPE_BOOLEAN, null, - ['nullable' => false, 'dafault' => true], + ['nullable' => false, 'default' => true], 'Is visible flag' )->addIndex( $setup->getIdxName( diff --git a/app/code/Magento/Vault/Setup/UpgradeSchema.php b/app/code/Magento/Vault/Setup/UpgradeSchema.php new file mode 100644 index 0000000000000..643bd1751f668 --- /dev/null +++ b/app/code/Magento/Vault/Setup/UpgradeSchema.php @@ -0,0 +1,51 @@ +startSetup(); + if (version_compare($context->getVersion(), '2.0.3', '<')) { + $this->upgradeTokenTableDefaultValues($setup); + } + $setup->endSetup(); + } + + /** + * @param SchemaSetupInterface $setup + * @return void + */ + private function upgradeTokenTableDefaultValues(SchemaSetupInterface $setup) + { + $columns = ['is_active', 'is_visible']; + + foreach ($columns as $columnName) { + $setup->getConnection()->modifyColumn( + $setup->getTable(InstallSchema::PAYMENT_TOKEN_TABLE), + $columnName, + [ + 'type' => Table::TYPE_BOOLEAN, + 'nullable' => false, + 'default' => '1' + ] + ); + } + } +} diff --git a/app/code/Magento/Vault/etc/module.xml b/app/code/Magento/Vault/etc/module.xml index 1a7d1fe7d09fd..253e7f13aaadc 100644 --- a/app/code/Magento/Vault/etc/module.xml +++ b/app/code/Magento/Vault/etc/module.xml @@ -6,7 +6,7 @@ */ --> - +