Skip to content

Commit 59bd8fc

Browse files
committed
Merge branch '2.2-develop' of github.com:magento/magento2ce into MAGETWO-84480
2 parents 3e86102 + f28dbc0 commit 59bd8fc

File tree

64 files changed

+347
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+347
-135
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.
66

77
## Magento system requirements
8-
[Magento system requirements](http://devdocs.magento.com/magento-system-requirements.html)
8+
[Magento system requirements](http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements2.html)
99

1010
## Install Magento
1111
To install Magento, see either:
1212

1313
* [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento.
14-
* [Installation guide](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html)
14+
* [Installation guide](http://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html)
1515

1616
<h2>Contributing to the Magento 2 code base</h2>
1717
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
@@ -22,8 +22,8 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].
2222

2323
To suggest documentation improvements, click [here][4].
2424

25-
[1]: <http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html>
26-
[2]: <http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#report>
25+
[1]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html>
26+
[2]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#report>
2727
[3]: <https://github.com/magento/magento2/issues>
2828
[4]: <http://devdocs.magento.com>
2929

app/code/Magento/Backup/Model/Db.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function createBackup(\Magento\Framework\Backup\Db\BackupInterface $backu
154154

155155
if ($tableStatus->getDataLength() > self::BUFFER_LENGTH) {
156156
if ($tableStatus->getAvgRowLength() < self::BUFFER_LENGTH) {
157-
$limit = floor(self::BUFFER_LENGTH / $tableStatus->getAvgRowLength());
157+
$limit = floor(self::BUFFER_LENGTH / max($tableStatus->getAvgRowLength(), 1));
158158
$multiRowsLength = ceil($tableStatus->getRows() / $limit);
159159
} else {
160160
$limit = 1;

app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function getStoreSwitcherHtml()
228228
public function getLoadTreeUrl($expanded = null)
229229
{
230230
$params = ['_current' => true, 'id' => null, 'store' => null];
231-
if (is_null($expanded) && $this->_backendSession->getIsTreeWasExpanded() || $expanded == true) {
231+
if ($expanded === null && $this->_backendSession->getIsTreeWasExpanded() || $expanded == true) {
232232
$params['expand_all'] = true;
233233
}
234234
return $this->getUrl('*/*/categoriesJson', $params);

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ public function getOptionValues()
313313
$value['checkboxScopeTitle'] = $this->getCheckboxScopeHtml(
314314
$option->getOptionId(),
315315
'title',
316-
is_null($option->getStoreTitle())
316+
$option->getStoreTitle() === null
317317
);
318-
$value['scopeTitleDisabled'] = is_null($option->getStoreTitle()) ? 'disabled' : null;
318+
$value['scopeTitleDisabled'] = $option->getStoreTitle() === null ? 'disabled' : null;
319319
}
320320

321321
if ($option->getGroupByType() == ProductCustomOptionInterface::OPTION_GROUP_SELECT) {
@@ -341,22 +341,22 @@ public function getOptionValues()
341341
$value['optionValues'][$i]['checkboxScopeTitle'] = $this->getCheckboxScopeHtml(
342342
$_value->getOptionId(),
343343
'title',
344-
is_null($_value->getStoreTitle()),
344+
$_value->getStoreTitle() === null,
345345
$_value->getOptionTypeId()
346346
);
347-
$value['optionValues'][$i]['scopeTitleDisabled'] = is_null(
348-
$_value->getStoreTitle()
347+
$value['optionValues'][$i]['scopeTitleDisabled'] = (
348+
$_value->getStoreTitle() === null
349349
) ? 'disabled' : null;
350350
if ($scope == \Magento\Store\Model\Store::PRICE_SCOPE_WEBSITE) {
351351
$value['optionValues'][$i]['checkboxScopePrice'] = $this->getCheckboxScopeHtml(
352352
$_value->getOptionId(),
353353
'price',
354-
is_null($_value->getstorePrice()),
354+
$_value->getstorePrice() === null,
355355
$_value->getOptionTypeId(),
356356
['$(this).up(1).previous()']
357357
);
358-
$value['optionValues'][$i]['scopePriceDisabled'] = is_null(
359-
$_value->getStorePrice()
358+
$value['optionValues'][$i]['scopePriceDisabled'] = (
359+
$_value->getStorePrice() === null
360360
) ? 'disabled' : null;
361361
}
362362
}
@@ -379,9 +379,9 @@ public function getOptionValues()
379379
$value['checkboxScopePrice'] = $this->getCheckboxScopeHtml(
380380
$option->getOptionId(),
381381
'price',
382-
is_null($option->getStorePrice())
382+
$option->getStorePrice() === null
383383
);
384-
$value['scopePriceDisabled'] = is_null($option->getStorePrice()) ? 'disabled' : null;
384+
$value['scopePriceDisabled'] = $option->getStorePrice() === null ? 'disabled' : null;
385385
}
386386
}
387387
$values[] = new \Magento\Framework\DataObject($value);

app/code/Magento/Catalog/Block/Product/ProductList/Related.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getItems()
121121
* getIdentities() depends on _itemCollection populated, but it can be empty if the block is hidden
122122
* @see https://github.com/magento/magento2/issues/5897
123123
*/
124-
if (is_null($this->_itemCollection)) {
124+
if ($this->_itemCollection === null) {
125125
$this->_prepareData();
126126
}
127127
return $this->_itemCollection;

app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function getItemCollection()
140140
* getIdentities() depends on _itemCollection populated, but it can be empty if the block is hidden
141141
* @see https://github.com/magento/magento2/issues/5897
142142
*/
143-
if (is_null($this->_itemCollection)) {
143+
if ($this->_itemCollection === null) {
144144
$this->_prepareData();
145145
}
146146
return $this->_itemCollection;
@@ -151,7 +151,7 @@ public function getItemCollection()
151151
*/
152152
public function getItems()
153153
{
154-
if (is_null($this->_items)) {
154+
if ($this->_items === null) {
155155
$this->_items = $this->getItemCollection()->getItems();
156156
}
157157
return $this->_items;

app/code/Magento/Catalog/Helper/Product/View.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,18 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
122122
// Load default page handles and page configurations
123123
if ($params && $params->getBeforeHandles()) {
124124
foreach ($params->getBeforeHandles() as $handle) {
125-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
126125
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
126+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
127127
}
128128
}
129-
130-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
129+
131130
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
131+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
132132

133133
if ($params && $params->getAfterHandles()) {
134134
foreach ($params->getAfterHandles() as $handle) {
135-
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
136135
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
136+
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
137137
}
138138
}
139139

app/code/Magento/Catalog/Model/Config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public function getSourceOptionId($source, $value)
407407
*/
408408
public function getProductAttributes()
409409
{
410-
if (is_null($this->_productAttributes)) {
410+
if ($this->_productAttributes === null) {
411411
$this->_productAttributes = array_keys($this->getAttributesUsedInProductListing());
412412
}
413413
return $this->_productAttributes;
@@ -430,7 +430,7 @@ protected function _getResource()
430430
*/
431431
public function getAttributesUsedInProductListing()
432432
{
433-
if (is_null($this->_usedInProductListing)) {
433+
if ($this->_usedInProductListing === null) {
434434
$this->_usedInProductListing = [];
435435
$entityType = \Magento\Catalog\Model\Product::ENTITY;
436436
$attributesData = $this->_getResource()->setStoreId($this->getStoreId())->getAttributesUsedInListing();
@@ -453,7 +453,7 @@ public function getAttributesUsedInProductListing()
453453
*/
454454
public function getAttributesUsedForSortBy()
455455
{
456-
if (is_null($this->_usedForSortBy)) {
456+
if ($this->_usedForSortBy === null) {
457457
$this->_usedForSortBy = [];
458458
$entityType = \Magento\Catalog\Model\Product::ENTITY;
459459
$attributesData = $this->_getResource()->getAttributesUsedForSortBy();

app/code/Magento/Catalog/Model/Layer/Filter/Price.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
150150
public function getCustomerGroupId()
151151
{
152152
$customerGroupId = $this->_getData('customer_group_id');
153-
if (is_null($customerGroupId)) {
153+
if ($customerGroupId === null) {
154154
$customerGroupId = $this->_customerSession->getCustomerGroupId();
155155
}
156156

@@ -176,7 +176,7 @@ public function setCustomerGroupId($customerGroupId)
176176
public function getCurrencyRate()
177177
{
178178
$rate = $this->_getData('currency_rate');
179-
if (is_null($rate)) {
179+
if ($rate === null) {
180180
$rate = $this->_storeManager->getStore($this->getStoreId())
181181
->getCurrentCurrencyRate();
182182
}

app/code/Magento/Catalog/Model/Product/Attribute/Backend/GroupPrice/AbstractGroupPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function __construct(
9191
*/
9292
protected function _getWebsiteCurrencyRates()
9393
{
94-
if (is_null($this->_rates)) {
94+
if ($this->_rates === null) {
9595
$this->_rates = [];
9696
$baseCurrency = $this->_config->getValue(
9797
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE,

0 commit comments

Comments
 (0)