Skip to content

Commit c29f3e7

Browse files
author
Volodymyr Klymenko
authored
Merge pull request #123 from magento-folks/github_pr
[Folks] GitHub requests
2 parents 53e270e + 7aeac1e commit c29f3e7

File tree

8 files changed

+19
-6
lines changed

8 files changed

+19
-6
lines changed

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Magento\Framework\Registry;
1616
use Magento\Payment\Model\IframeConfigProvider;
1717
use Magento\Quote\Api\CartManagementInterface;
18+
use Magento\Framework\Exception\LocalizedException;
1819

1920
/**
2021
* Class Place
@@ -125,6 +126,9 @@ protected function placeCheckoutOrder()
125126
'action' => $this
126127
]
127128
);
129+
} catch (LocalizedException $exception) {
130+
$result->setData('error', true);
131+
$result->setData('error_messages', $exception->getMessage());
128132
} catch (\Exception $exception) {
129133
$result->setData('error', true);
130134
$result->setData('error_messages', __('Unable to place order. Please try again later.'));

app/code/Magento/Checkout/Block/Cart/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getHref()
6565
*/
6666
protected function _toHtml()
6767
{
68-
if ($this->_moduleManager->isOutputEnabled('Magento_Checkout')) {
68+
if (!$this->_moduleManager->isOutputEnabled('Magento_Checkout')) {
6969
return '';
7070
}
7171
return parent::_toHtml();

app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testToHtml()
5757
)->with(
5858
'Magento_Checkout'
5959
)->will(
60-
$this->returnValue(true)
60+
$this->returnValue(false)
6161
);
6262
$this->assertSame('', $block->toHtml());
6363
}

app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ define(
242242
emailValidationResult = customer.isLoggedIn();
243243

244244
if (!quote.shippingMethod()) {
245-
this.errorValidationMessage('Please specify a shipping method.');
245+
this.errorValidationMessage($.mage.__('Please specify a shipping method.'));
246246

247247
return false;
248248
}

app/code/Magento/Eav/Model/Entity/AbstractEntity.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,11 @@ protected function _loadModelAttributes($object)
10151015
$selectGroups = $this->_resourceHelper->getLoadAttributesSelectGroups($selects);
10161016
foreach ($selectGroups as $selects) {
10171017
if (!empty($selects)) {
1018-
$select = $this->_prepareLoadSelect($selects);
1018+
if (is_array($selects)) {
1019+
$select = $this->_prepareLoadSelect($selects);
1020+
} else {
1021+
$select = $selects;
1022+
}
10191023
$values = $this->getConnection()->fetchAll($select);
10201024
foreach ($values as $valueRow) {
10211025
$this->_setAttributeValue($object, $valueRow);

app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,11 @@ public function _loadAttributes($printQuery = false, $logQuery = false)
11751175
foreach ($selectGroups as $selects) {
11761176
if (!empty($selects)) {
11771177
try {
1178-
$select = implode(' UNION ALL ', $selects);
1178+
if (is_array($selects)) {
1179+
$select = implode(' UNION ALL ', $selects);
1180+
} else {
1181+
$select = $selects;
1182+
}
11791183
$values = $this->getConnection()->fetchAll($select);
11801184
} catch (\Exception $e) {
11811185
$this->printLogQuery(true, true, $select);

app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class PropertyMapper extends PropertyMapperAbstract
2222
public function map(array $input, $entityTypeId)
2323
{
2424
return [
25+
'attribute_model' => $this->_getValue($input, 'attribute_model'),
2526
'backend_model' => $this->_getValue($input, 'backend'),
2627
'backend_type' => $this->_getValue($input, 'type', 'varchar'),
2728
'backend_table' => $this->_getValue($input, 'table'),

app/code/Magento/Eav/Model/ResourceModel/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ public function getLoadAttributesSelectGroups($selects)
8080
foreach ($selects as $selectGroup) {
8181
$mainGroup = array_merge($mainGroup, $selectGroup);
8282
}
83-
return [$mainGroup];
83+
return $mainGroup;
8484
}
8585
}

0 commit comments

Comments
 (0)