Skip to content

Commit fcbaf56

Browse files
committed
MC-40555: Add PHP 7.4 declaration
- Updated laminas dependency and fixed PHP code errors
1 parent 1d3eb2c commit fcbaf56

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

app/code/Magento/Catalog/Model/Category/Attribute/Backend/Sortby.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ public function beforeSave($object)
104104
}
105105
if ($attributeCode == 'default_sort_by') {
106106
$data = $object->getData($attributeCode);
107-
$attributeValue = is_array($data) ? reset($data) :
108-
(!empty($data)) ? $data : null;
107+
$attributeValue = (is_array($data) ? reset($data) : (!empty($data))) ? $data : null;
109108
$object->setData($attributeCode, $attributeValue);
110109
}
111110
if (!$object->hasData($attributeCode)) {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"elasticsearch/elasticsearch": "~2.0||~5.1||~6.1||~7.6",
4444
"guzzlehttp/guzzle": "^6.3.3",
4545
"laminas/laminas-captcha": "^2.7.1",
46-
"laminas/laminas-code": "~3.3.0",
46+
"laminas/laminas-code": "~3.4.1",
4747
"laminas/laminas-config": "^2.6.0",
4848
"laminas/laminas-console": "^2.6.0",
4949
"laminas/laminas-crypt": "^2.6.0",

composer.lock

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getCodeByFrontName($frontName)
7575
$resolver = $this->_resolverFactory->create($areaInfo['frontNameResolver']);
7676
$areaInfo['frontName'] = $resolver->getFrontName(true);
7777
}
78-
if ($areaInfo['frontName'] === $frontName) {
78+
if (isset($areaInfo['frontName']) && $areaInfo['frontName'] === $frontName) {
7979
return $areaCode;
8080
}
8181
}

0 commit comments

Comments
 (0)