Skip to content

Commit 343f5ad

Browse files
author
Oleksii Korshenko
authored
MAGETWO-70785: check if node id exists before checking its admin #10262
2 parents ce5dbd5 + 729d78d commit 343f5ad

File tree

2 files changed

+4
-2
lines changed
  • app/code/Magento

2 files changed

+4
-2
lines changed

app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ private function getAclResources()
190190
$configResource = array_filter(
191191
$resources,
192192
function ($node) {
193-
return $node['id'] == 'Magento_Backend::admin';
193+
return isset($node['id'])
194+
&& $node['id'] == 'Magento_Backend::admin';
194195
}
195196
);
196197
$configResource = reset($configResource);

app/code/Magento/User/Block/Role/Tab/Edit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ private function getAclResources()
210210
$configResource = array_filter(
211211
$resources,
212212
function ($node) {
213-
return $node['id'] == 'Magento_Backend::admin';
213+
return isset($node['id'])
214+
&& $node['id'] == 'Magento_Backend::admin';
214215
}
215216
);
216217
$configResource = reset($configResource);

0 commit comments

Comments
 (0)