Skip to content

Commit 08648cb

Browse files
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #14115: [Backport 2.1] MAGETWO-71697: Fix possible bug when saving address with empty street line (by @simpleadm) - magento-engcom/magento2ce#1454: [2.1] Add a CodeTriage badge to magento/magento2 (by @ishakhsuvarov) - #14117: [Backport 2.1] MAGETWO-59258: Override module-directory/etc/zip_codes.xml only the last code of a country gets include (by @simpleadm) - #14098: [Backport 2.1] MAGETWO-64250 Problem on mobile when catalog gallery allowfullscreen is false (by @simpleadm) - #14096: [Backport 2.1] Schedule generation was broken (by @simpleadm) Fixed GitHub Issues: - #6694: Override zip_codes.xml (reported by @luukschakenraad) has been fixed in #14117 by @simpleadm in 2.1-develop branch Related commits: 1. 4ddb336 - #5808: [2.1.0] Problem on mobile when catalog gallery allowfullscreen is false (reported by @peec) has been fixed in #14098 by @simpleadm in 2.1-develop branch Related commits: 1. ab695e0 - #4173: Cron schedule bug (reported by @adrok) has been fixed in #14096 by @simpleadm in 2.1-develop branch Related commits: 1. 1a8e4a5
2 parents 92325c4 + 19c8770 commit 08648cb

File tree

6 files changed

+38
-27
lines changed

6 files changed

+38
-27
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Build Status](https://travis-ci.org/magento/magento2.svg?branch=develop)](https://travis-ci.org/magento/magento2)
1+
[![Build Status](https://travis-ci.org/magento/magento2.svg?branch=2.1-develop)](https://travis-ci.org/magento/magento2)
2+
[![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2)
23
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
34
<h2>Welcome</h2>
45
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.

app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ protected function saveSchedule($jobCode, $cronExpression, $timeInterval, $exist
454454
if ($schedule->trySchedule()) {
455455
// time matches cron expression
456456
$schedule->save();
457-
return;
458457
}
459458
}
460459
}

app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -530,23 +530,19 @@ public function testDispatchGenerate()
530530
{
531531
$jobConfig = [
532532
'test_group' => [
533-
'default' => [
534-
'test_job1' => [
535-
'instance' => 'CronJob',
536-
'method' => 'execute',
537-
],
533+
'test_job1' => [
534+
'instance' => 'CronJob',
535+
'method' => 'execute',
538536
],
539537
],
540538
];
541539

542540
$this->_config->expects($this->at(0))->method('getJobs')->will($this->returnValue($jobConfig));
543541
$jobs = [
544542
'test_group' => [
545-
'default' => [
546-
'job1' => ['config_path' => 'test/path'],
547-
'job2' => ['schedule' => ''],
548-
'job3' => ['schedule' => '* * * * *'],
549-
],
543+
'job1' => ['config_path' => 'test/path'],
544+
'job2' => ['schedule' => ''],
545+
'job3' => ['schedule' => '* * * * *'],
550546
],
551547
];
552548
$this->_config->expects($this->at(1))->method('getJobs')->will($this->returnValue($jobs));
@@ -570,32 +566,40 @@ public function testDispatchGenerate()
570566
$this->returnValue(time() + 10000000)
571567
);
572568

573-
$this->_scopeConfig->expects($this->at(0))->method('getValue')->will($this->returnValue(0));
569+
$this->_scopeConfig->expects($this->any())->method('getValue')->willReturnMap(
570+
[
571+
[
572+
'system/cron/test_group/schedule_generate_every',
573+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
574+
null,
575+
0
576+
],
577+
[
578+
'system/cron/test_group/schedule_ahead_for',
579+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
580+
null,
581+
2
582+
]
583+
]
584+
);
574585

575-
$scheduleMethods = ['getJobCode', 'getScheduledAt', 'trySchedule', 'unsScheduleId', 'save', '__wakeup'];
576586
$schedule = $this->getMockBuilder(
577587
'Magento\Cron\Model\Schedule'
578588
)->setMethods(
579-
$scheduleMethods
589+
['getJobCode', 'getScheduledAt', 'trySchedule', 'unsScheduleId', 'save', '__wakeup', 'getCollection']
580590
)->disableOriginalConstructor()->getMock();
581591
$schedule->expects($this->any())->method('getJobCode')->will($this->returnValue('job_code1'));
582592
$schedule->expects($this->once())->method('getScheduledAt')->will($this->returnValue('* * * * *'));
583593
$schedule->expects($this->any())->method('unsScheduleId')->will($this->returnSelf());
584594
$schedule->expects($this->any())->method('trySchedule')->will($this->returnSelf());
595+
$schedule->expects($this->any())->method('getCollection')->willReturn($this->_collection);
596+
$schedule->expects($this->atLeastOnce())->method('save')->willReturnSelf();
585597

586598
$this->_collection->addItem(new \Magento\Framework\DataObject());
587599
$this->_collection->addItem($schedule);
588600

589601
$this->_cache->expects($this->any())->method('save');
590602

591-
$scheduleMock = $this->getMockBuilder(
592-
'Magento\Cron\Model\Schedule'
593-
)->disableOriginalConstructor()->setMethods(
594-
['getCollection', '__wakeup']
595-
)->getMock();
596-
$scheduleMock->expects($this->any())->method('getCollection')->will($this->returnValue($this->_collection));
597-
$this->_scheduleFactory->expects($this->any())->method('create')->will($this->returnValue($scheduleMock));
598-
599603
$this->_scheduleFactory->expects($this->any())->method('create')->will($this->returnValue($schedule));
600604

601605
$this->_observer->execute($this->observer);

app/code/Magento/Customer/Model/Address/AbstractAddress.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function setData($key, $value = null)
263263
{
264264
if (is_array($key)) {
265265
$key = $this->_implodeArrayField($key);
266-
} elseif (is_array($value) && !empty($value) && $this->isAddressMultilineAttribute($key)) {
266+
} elseif (is_array($value) && $this->isAddressMultilineAttribute($key)) {
267267
$value = $this->_implodeArrayValues($value);
268268
}
269269
return parent::setData($key, $value);
@@ -303,7 +303,11 @@ protected function _implodeArrayField(array $data)
303303
*/
304304
protected function _implodeArrayValues($value)
305305
{
306-
if (is_array($value) && count($value)) {
306+
if (is_array($value)) {
307+
if (!count($value)) {
308+
return '';
309+
}
310+
307311
$isScalar = false;
308312
foreach ($value as $val) {
309313
if (is_scalar($val)) {

app/code/Magento/Directory/Model/Country/Postcode/Config/Reader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem
1212
*
1313
* @var array
1414
*/
15-
protected $_idAttributes = ['/config/zip' => 'countryCode'];
15+
protected $_idAttributes = [
16+
'/config/zip' => 'countryCode',
17+
'/config/zip/codes/code' => 'id',
18+
];
1619

1720
/**
1821
* Construct the FileSystem Reader Class

lib/web/mage/gallery/gallery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ define([
143143
}
144144
});
145145

146-
if (this.isTouchEnabled) {
146+
if (this.isTouchEnabled && this.settings.isFullscreen) {
147147
this.settings.$element.on('tap', '.fotorama__stage__frame', function () {
148148
var translate = getTranslate($(this).parents('.fotorama__stage__shaft'));
149149

0 commit comments

Comments
 (0)