Skip to content

Commit d48faba

Browse files
Merge pull request #1425 from magento-engcom/develop-prs
[EngCom] Public Pull Requests - MAGETWO-71743: Removed instantiating new driverpool class when it's already available. #10590 - MAGETWO-71742: Changed typos in class comment #10589 - MAGETWO-71705: fixed notice when remove column from grid #10579 - MAGETWO-71670: Fix issue #10565 #10575
2 parents adb30ab + 16006c5 commit d48faba

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Extended.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ public function removeColumn($columnId)
314314
if ($this->getColumnSet()->getChildBlock($columnId)) {
315315
$this->getColumnSet()->unsetChild($columnId);
316316
if ($this->_lastColumnId == $columnId) {
317-
$this->_lastColumnId = array_pop($this->getColumnSet()->getChildNames());
317+
$names = $this->getColumnSet()->getChildNames();
318+
$this->_lastColumnId = array_pop($names);
318319
}
319320
}
320321
return $this;

app/code/Magento/Ui/view/base/web/js/form/element/multiselect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ define([
5252
* @param {Array} data - current component value
5353
*/
5454
setPrepareToSendData: function (data) {
55-
if (!data.length) {
55+
if (_.isUndefined(data) || !data.length) {
5656
data = '';
5757
}
5858

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/element/multiselect.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ define([
5252
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
5353
});
5454

55+
it('Check method call with undefined as parameter.', function () {
56+
57+
expect(obj.setPrepareToSendData(undefined)).toBeUndefined();
58+
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', '');
59+
});
60+
5561
it('Check method call with array with data as parameter.', function () {
5662
expect(obj.setPrepareToSendData(['1', '2', '3'])).toBeUndefined();
5763
expect(obj.source.set).toHaveBeenCalledWith(dataScope + '-prepared-for-send', ['1', '2', '3']);

lib/internal/Magento/Framework/App/ObjectManagerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool,
260260
new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool)
261261
),
262262
new \Magento\Framework\Config\FileIteratorFactory(
263-
new \Magento\Framework\Filesystem\File\ReadFactory(new \Magento\Framework\Filesystem\DriverPool())
263+
new \Magento\Framework\Filesystem\File\ReadFactory($driverPool)
264264
)
265265
);
266266
$schemaLocator = new \Magento\Framework\ObjectManager\Config\SchemaLocator();

lib/internal/Magento/Framework/Filesystem/DirectoryList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* Application file system directories dictionary
3+
* Application file system directories dictionary.
44
*
5-
* Provides information about what directories are available in the application
6-
* Serves as customizaiton point to specify different directories or add own
5+
* Provides information about what directories are available in the application.
6+
* Serves as a customization point to specify different directories or add your own.
77
*
88
* Copyright © Magento, Inc. All rights reserved.
99
* See COPYING.txt for license details.

0 commit comments

Comments
 (0)